E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
nullptr
线程安全智能指针实现(引用计数)
ifndefINTELLECT_PTR_H#defineINTELLECT_PTR_H#include#includetemplateclassinterllect_ptr{public:interllect_ptr(){if(_p==
nullptr
三体问题
·
2020-07-02 15:15
c++编程
PixHawk学习笔记 之 源码浅析——mc_pos_control.cpp——task_main
先说几组名词:fwmode:Fixed-wingmode(固定翼模式)VTOL:VerticalTake-OffandLanding(垂直起降)
nullptr
:C++中空指针类型的关键字再整一个框架前期准备工作
沉包裹
·
2020-07-02 14:44
PIxHawk
剑指offer题目汇总(一)
classCMyString{public:CMyString(char*pData=
nullptr
);CMyString(constCMyString&st
noaname
·
2020-07-02 14:16
剑指offer题目汇总
静态指针的区分
在C++11中,新引入了一种特殊类型的字面值
nullptr
来初始化指针为空指针.它能够
moni_mm
·
2020-07-02 12:45
C/C++基础
【剑指offer】面试题1:赋值运算符函数【C++版本】
classCMyString{public://构造函数CMyString(char*pData=
nullptr
);//拷贝构造函数CMyString(constCMyString&str);//赋值运算符函数
DigitalNexus
·
2020-07-02 11:50
后台
剑指offer
C++
Qt之弹出界面显示在父窗口中间
newQNewDiglog(parent);dlg->show();弹出的对话框就会自动显示在父窗口的中间第二种:创建新对话框时获取父窗口的指针,再获取父窗口原点坐标,计算显示的位置QWidget*widget=
nullptr
linkang1024
·
2020-07-02 08:53
QT之路
数组类模板
#includeusingnamespacestd;templateclassArray{public://构造函数Array():list(
nullptr
),size(0){};Array(T*ar,
lemon1003657090
·
2020-07-02 07:59
vector的简单实现
#include#includeusingnamespacestd;templateclassVector{public:Vector():_start(
nullptr
),_finish(
nullptr
ldbite
·
2020-07-02 07:41
C++11标准库-新特性
本文主要是简要总结,还有一点看不太懂的地方,会只有一个简要说明1.vector>v,这里不需要把两个>>分开也不会报错,老标准会报错,必须分开写,>>2,新的空指针,int*p=
nullptr
,作用于voidf
landihao
·
2020-07-02 07:34
C++11标准库学习
c++
二叉树深度优先遍历详解
vectorinorderTraversal(TreeNode*root){inorder(root);returnresult;}voidinorder(TreeNode*root){if(root==
nullptr
Chao's Code
·
2020-07-02 05:31
C/C++
webrtc c++ (一) 打开摄像头设备并显示
GetDeviceList(){//获取到系统下所有的设备信息std::unique_ptrinfo(webrtc::VideoCaptureFactory::CreateDeviceInfo());if(info==
nullptr
i7891090
·
2020-07-02 03:32
webrtc
c++
qt
webrtc
c++
C++11 学习笔记-06.Spaces in Template Expressions
SpacesinTemplateExpressionsvector>;//可以在C++的版本,必须有空格vector>;//任何版本都可以这么编译通过了nullptrandstd::
nullptr
_tC
鱼酱2333
·
2020-07-02 02:30
C++11
双向链表反转
链表节点定义:structListHao{ListHao*prev=
nullptr
;ListHao*next=
nullptr
;doubleelement=0;};ListHao*ReverseList(
半路IT
·
2020-07-02 01:28
C++
opencv库练习--参考SLAM十四讲5.3
,char**argv){cv::Matimage;//image=cv::imread("ubuntu.png");image=cv::imread(argv[1]);if(image.data==
nullptr
fukaixin12
·
2020-07-02 00:17
SLAM
自定义一个动态分配的vector类
#include"pch.h"#include#includeusingnamespacestd;classStrVec{public:StrVec():elements(
nullptr
),first_free
codesailor
·
2020-07-01 22:34
C++
Qt之QFileDialog另存文件时应该注意的问题
QStringLiteral("ImageSaveAs"),":/image/good.png",QString(tr("Images(*.png*.bmp*.jpg*.gif*.jpeg)")),Q_
NULLPTR
灿哥哥
·
2020-07-01 19:14
Qt
cocos2dx ActionTimeline setLastFrameCallFunc
lua_cocos2dx_ui_manualstatic中写入staticintlua_cocos2dx_ActionTimeline_setLastFrameCallFunc(lua_State*L){if(
nullptr
轮回之狐
·
2020-07-01 19:32
cocos2dx学习之路
QT笔记(6)——Qt打开文件与保存文件
Qt打开文件与保存文件,首先打开文件,qt给了一个方法直接调用就好,如下:staticQStringgetOpenFileName(QWidget*parent=Q_
NULLPTR
,constQString
abcvincent
·
2020-07-01 16:58
qt
C++ 单例模式的模板类 - 懒汉类型
singleton(constsingleton&);singleton&operator=(constsingleton&);public:staticsingleton*GetInstance(){if(
nullptr
Y_jay
·
2020-07-01 15:25
C++
Qt实现带验证码的输入框
include#include#includeclassLogonWidget:publicQWidget{Q_OBJECTpublic:explicitLogonWidget(QWidget*parent=
nullptr
Sparrow_du
·
2020-07-01 13:53
QT
C++
剑指offer - 面试题12:矩阵中的路径 - C++
classSolution{public:boolhasPath(char*matrix,introws,intcols,char*str){if(matrix==
nullptr
||rows=0&&row
L_bic
·
2020-07-01 11:04
算法笔记练习 9.4 二叉查找树(BST) 问题 B: 二叉搜索树
structNode{chardata;Node*lchild,*rchild;};Node*newNode(charx){Node*p=newNode;p->data=x;p->lchild=p->rchild=
nullptr
gorgeoustray
·
2020-07-01 09:06
算法笔记
算法笔记练习 9.4 二叉查找树(BST) 问题 A: 二叉排序树
1structNode{intdata;Node*lchild,*rchild;};Node*newNode(intx){Node*p=newNode;p->data=x;p->lchild=p->rchild=
nullptr
gorgeoustray
·
2020-07-01 09:06
算法笔记
QT中的tcp一个服务器处理多个客户端
客户端:我们先在头文件中在头文件中添加#include声明一个空的QTcpSocket*tcpsocket=
nullptr
;我们在.cpp文件的初始化位置new一个QTcpSocket()对象;tcpsocket
读不懂的标题
·
2020-07-01 06:38
QT
利用Qt画一个时钟
include#include"ui_QtClock.h"classQtClock:publicQMainWindow{Q_OBJECTpublic:QtClock(QWidget*parent=Q_
NULLPTR
-却道天凉好个秋
·
2020-07-01 06:05
Qt
QGraphics View绘图架构实例
include#include"ui_QFormTable.h"classQFormTable:publicQWidget{Q_OBJECTpublic:QFormTable(QWidget*parent=Q_
NULLPTR
-却道天凉好个秋
·
2020-07-01 06:33
Qt
单链表反转的两种方法
*/usingnamespacestd;//链表classList{public:List(intdata=0):data(data){next=
nullptr
;}intdata;List*next;}
电气小白i
·
2020-07-01 03:44
nullptr
(转)
引入
nullptr
的原因引入
nullptr
的原因,这个要从NULL说起。对于C和C++程序员来说,一定不会对NULL感到陌生。但是C和C++中的NULL却不等价。
yangqi916
·
2020-07-01 02:05
剑指offer之复杂链表的复制
在复杂链表中,每个结点除了有一个m_pNext指针指向下一个结点外,还有一个m_pSibling指向链表中的任意结点或者
nullptr
。
四叶草姚
·
2020-06-30 19:16
剑指offer
数据结构——链表
如果有的话就写坐标,没有的话就是NULL/
nullptr
。初始化Node*CreatLinkList(int*array,intlen){Node*pre,*head,*temp;//pre是保存
Horizon
·
2020-06-30 14:56
算法
程序员
数据结构
剑指offer面试题1——类中的赋值运算符函数
classCMyString{public:CMyString(char*pData=
nullptr
);CMyString(constCMyString&str);~CMyString();CMyString
zhangying_496
·
2020-06-30 14:39
C++
剑指offer笔记
QT-- 模态对话框与非模态对话框
include"ui_QtDialogToShow.h"classQtDialogToShow:publicQDialog{Q_OBJECTpublic:QtDialogToShow(QWidget*parent=Q_
NULLPTR
yifanmoon
·
2020-06-30 07:17
Qt学习之道
QT技巧系列(5)按时间顺序列出目录下所有的文件名
on_pushButton_listfile_clicked(){inti,j;QDir*dir;QStringListlistdatFilename;listdatFilename.clear();ui->listView->setModel(
nullptr
ydyuse
·
2020-06-30 07:56
QT/C++
查找算法之二 二分查找(C++版本)
代码实现:循环形式intBinarySearch(int*pData,intsize,intvalue){if(
nullptr
==p
xupeng1644
·
2020-06-30 03:22
Search
Algorithm
38. 数字在排序数组中出现的次数(C++版本)
实现代码:intGetFirstPosOfDestData(int*pData,intsize,intdestData,intbegin,intend){if(
nullptr
==pData||sizeend
xupeng1644
·
2020-06-30 03:22
剑指offer
二叉树按层序打印
从上到下按层打印二叉树,同一层节点从左致右输出,每一层输出一行代码实现://用两个队列实现按层打印树vector>Print2(TreeNode*pRoot){vector>res;if(pRoot==
nullptr
wyn126
·
2020-06-29 22:42
每日一题
C++ QT画图入门练习
includenamespaceUi{classWidget;}classWidget:publicQWidget{Q_OBJECTpublic:explicitWidget(QWidget*parent=
nullptr
wwxy261
·
2020-06-29 22:15
算法
QImage 通过load打开图片失败的一种特殊情况
QImage的load(constQString&fileName,constchar*format=
nullptr
)函数,第二个参数表示以何种格式解析图片文件,但在实际应用中,由于要支持多种格式,不方便对每个图片都自动指定文件实际的格式
浮光掠影001
·
2020-06-29 19:32
Qt
Binary Tree Preorder Traversal
pre-order基本做法三步驟statements;recursivecall(left)recursivecall(right)這邊的statement就是把數值存到要回傳的vector裡面當然只處理不是
nullptr
一枚煎餅
·
2020-06-29 12:24
AVL Tree(C++代码实现)
代码#includeusingnamespacestd;structNode{intval;Node*left,*right;Node(intv):val(v),left(
nullptr
),right(
梅菜扣rou
·
2020-06-29 08:26
算法笔记
二叉树遍历非递归版本
includeusingnamespacestd;typedefstructNode*pNode;structNode{charc;pNodelchild,rchild;Node(charc,pNodelchild=
nullptr
星星光点
·
2020-06-29 07:36
算法
C++学习31:侯捷C++11,14新特性(语法部分)
default,=delete4AliasTemplate(templatetypedef)5lambda一些小细节:1SpacesinTemplateExpressions2nullptrandstd:
nullptr
_t3AutomaticTypeDeductionwithauto4explicitfor
海洋之心。
·
2020-06-29 07:39
侯捷老师C++
leetcode-删除中间结点
解答一classSolution{public:voiddeleteNode(ListNode*node){if(node->next==
nullptr
)node=
nullptr
;//这句没有起作用,有点问题
weixin_42101177
·
2020-06-29 03:28
leetcode
Qt 线程的创建和使用(二)
自定义线程类,继承于QObject#pragmaonce#includeclassQtThread:publicQObject{Q_OBJECTpublic:QtThread(QObject*parent=
nullptr
芒种、
·
2020-06-28 21:12
Qt基础
List基本实现与算法
definepositionlistnode*templatestructlistnode{Tdata;positionpred;positionsucc;listnode(){};listnode(Te,positionp=
nullptr
爱吃肉编程
·
2020-06-28 21:44
数据结构与算法
剑指offer——面试题18.1:删除链表中重复的节点
45#include6#include"List.h"78voidDeleteDuplication(ListNode**pHead)9{10if(pHead==
nullptr
||*pHead==
nullptr
weixin_34404393
·
2020-06-28 18:21
pthread更改全局变量
global = 3;}int main(){ pthread_t thread; pthread_create(thread, NULL, assign_value, (void *)
nullptr
weixin_34102807
·
2020-06-28 11:23
C++ 获取时间
两种获取时间的方式使用#include下面的gettimeofday函数//获取微秒longGetCurrentMicroseconds(){timevaltime;gettimeofday(&time,
nullptr
weixin_34007879
·
2020-06-28 09:30
c++11特性
g++5.4.0使用c++11特性编译时需加参数-std=gnu++11或-std=c++111.特性1.1nullptrNULL可以直接赋值给bool,int,float等类型(有些会编译警告),而
nullptr
weixin_30254435
·
2020-06-27 15:06
ffmpeg解封装,学习记录。
BYTE_type):m_sourcePath(sourcePath),m_uiPagSize(uiPkgSize),m_uiSocketIndex(uiSocketIndex),m_pIfmtCtx(
nullptr
venice0708
·
2020-06-27 11:20
上一页
50
51
52
53
54
55
56
57
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他