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
异常
c++中异常的处理方式:#includeusingnamespacestd;voidtest1(){FILE*fp=fopen("2222.txt","rb");if(fp==
nullptr
){throw1
be_better_
·
2019-12-24 14:11
c++
c++
对称的二叉树
classSolution{public:boolisMirrorTree(TreeNode*p,TreeNode*q){if(p==
nullptr
&&q==
nullptr
)returntrue;if(
Amezf
·
2019-12-23 10:42
VecStr(模仿vector容器)
include#include#include#include#include#includeusingnamespacestd;classVecStr{public:VecStr():elements(
nullptr
峡迩
·
2019-12-20 19:28
C++的一些注意点
classAction{public:Action():file_act_(
nullptr
),buf_act_(
nullptr
){}};友元函数解释是:类的友元函数是定义在类外部,但有权访问
汨罗在北方
·
2019-12-19 14:53
7剑指OFFER之重建2叉树
intm_nKey;BinaryTreeNode*m_pLeft;BinaryTreeNode*m_pRight;BinaryTreeNode(intnVal):m_nKey(nVal),m_pLeft(
nullptr
Optimization
·
2019-12-18 04:56
leetcode之树
解题思路:intmaxDepth(TreeNode*root){if(
nullptr
==root)return
HugiFish
·
2019-12-16 11:56
剑指Offer-37.二叉树的深度(C++/Java)
程序:C++classSolution{public:intTreeDepth(TreeNode*pRoot){if(pRoot==
nullptr
)return0;re
silentteller
·
2019-12-15 23:00
阉割的List
#pragmaonce#includenamespacevlyf{templatestructNode{usingpointer=Node*;Keykey;Node*prev{
nullptr
};Node
vlyf
·
2019-12-14 20:00
Qt中文件对话框,颜色对话框,字体对话框
include#include#include#includeclassWidgetTest:publicQWidget{Q_OBJECTpublic:WidgetTest(QWidget*parent=Q_
NULLPTR
irelia03
·
2019-12-14 20:18
链表
无需多解释,注意创建链表时对尾指针的处理,以及
nullptr
和new,malloc是C里面的。
ustclcl
·
2019-12-12 04:04
设计模式-单例模式
锁的部分使用Qt的QMutex实现ClassName:SingletonSingleton.hclassSingleton{public:staticSingleton*GetInstance(){if(
nullptr
厝弧
·
2019-12-01 08:31
7.12 binary search tree
UniqueBinarySearchTreesintnumTrees(intn){intdp[n+1]={0};dp[0]=1;for(inti=1;igenerateR(intl,intr){if(l>r)returnvector{
nullptr
陈十十
·
2019-12-01 04:46
nil、Nil、NULL、NSNull之间的区别
NSNull是一个对象,只不过这个对象的值为空#ifndefnil#if__has_feature(cxx_
nullptr
)#definenilnullptr#else#definenil_
FlowerKanZhe
·
2019-11-30 02:48
C++空指针调用成员函数
classTestNullPtr{public:voidprint(){coutprint();}运行结果成功执行并正确打印:2、再看调用getA会发生什么:intmain(){TestNullPtr*ptr=
nullptr
wenmingxing
·
2019-11-29 22:12
把字符串中的每个空格替换为“%20”
"#includeusingnamespacestd;#include//length是字符数组str的总容量voidReplaceBlank(char*str,intlength){if(str==
nullptr
梦T醒
·
2019-11-20 21:18
字符替换
仿函数,()的重载
以智能指针为例说明,具体看注释:templateclassDFDef{public:voidoperator()(T*&p)//()的重载,只需要接受一个T类型对象的指针{if(p){deletep;p=
nullptr
be_better_
·
2019-11-15 11:38
c++
c++
异常
c++中异常的处理方式:#includeusingnamespacestd;voidtest1(){FILE*fp=fopen("2222.txt","rb");if(fp==
nullptr
){throw1
be_better_
·
2019-11-13 19:03
c++
c++
AVL树
templateclassAVLNode{public:Tvalue;AVLNode*left;AVLNode*right;intheight;boolvalid;AVLNode():value(0),left(
nullptr
manch1n
·
2019-11-11 22:00
c++11新特性介绍
更多关于STL文章——STL学习笔记文章目录c++11介绍核心语言的运行期表现强化右值引用和move语义关键字constexpr泛化的常量表示式核心语言使用性的加强template表达式内的空格
nullptr
Eloik
·
2019-11-09 19:41
C++
STL
c++11
STL
介绍
三大函数
//构造函数string(constchar*value=
nullptr
){if(value){data=newchar[strlen(value)+1];strcpy(data,value);}else
qyfl
·
2019-11-06 04:47
EditBox使用中出现的问题及解决方法
EditBox时的方法是:staticEditBox*create(constSize&size,Scale9Sprite*normalSprite,Scale9Sprite*pressedSprite=
nullptr
Kerwin_lang
·
2019-11-05 05:25
C++11的新特性
空指针
nullptr
空指针的字面值常量,它的类型是std::
nullptr
_t(定义位于cstddef)自动类型推断auto关键字,由auto定义的变量必须初始化。
龙遁流
·
2019-11-03 04:29
C++中 NULL和
nullptr
关系
而
nullptr
是从C++11开始引入的关键字。在C语言中,NULL的定义为(void)0,因为C语言可以隐式转换。
sonissa
·
2019-11-02 17:45
NULL
nullptr
string
c++11 6个函数
=
nullptr
?strcpy(newchar[strlen(pstr)+1],pstr):0);}A(constA&a){P
IamOnelong
·
2019-10-31 21:08
chapter 02 变量和基本类型
|
nullptr
|false转义序列eg:\n|\t|\\|\?可以通过加前后缀的方法指定字面值常量的类型L'a'|42U
D华丽
·
2019-10-31 08:56
使用 C++ 封装互斥量、条件变量
MutexLock首先封装mutex,下面为实现:classMutexLock:noncopyable{public:MutexLock(){assert(pthread_mutex_init(&mutex_,
nullptr
chenBright
·
2019-10-26 07:59
c++
并发编程
pthreads
linux编程
二叉树层次遍历相关题目
102.二叉树的层次遍历classSolution{public:vector>levelOrder(TreeNode*root){vector>res;if(root==
nullptr
)returnres
GuoXinxin
·
2019-10-19 21:00
二叉树的遍历-前、中、后(递归与非递归)
binary-tree-preorder-traversal/classSolution{public:vectorpreorderTraversal(TreeNode*root){vectorres;if(root==
nullptr
GuoXinxin
·
2019-10-19 18:00
C++中STL中简单的Vector的实现
defineSTRVEC_H34#include5#include6#include7usingnamespacestd;8classStrVec{9public:10//默认构造函数11StrVec():elements(
nullptr
盛夏落木
·
2019-10-18 00:00
剑指offer笔记面试题1----赋值运算符函数
classCMyString{public:CMyString(char*pData=
nullptr
);CMyString(constCMyString&str);~CMyString(void);private
奔跑的亮仔
·
2019-10-17 20:00
剑指offer笔记面试题2----实现Singleton模式
Singleton实例#includeusingnamespacestd;classSingleton{public:staticSingleton*getInstance(){if(m_pInstance==
nullptr
奔跑的亮仔
·
2019-10-17 20:00
剑指offer笔记面试题2----实现Singleton模式
Singleton实例#includeusingnamespacestd;classSingleton{public:staticSingleton*getInstance(){if(m_pInstance==
nullptr
奔跑的亮仔
·
2019-10-17 20:00
剑指offer笔记面试题6----从未到头打印链表
特殊输入测试(输入的链表头结点指针为
nullptr
)。测试代码:voidTest(ListNode*pHead){PrintList(pHead);PrintList
奔跑的亮仔
·
2019-10-17 19:00
剑指offer笔记面试题8----二叉树的下一个节点
特殊二叉树(所有节点都没有右子节点的二叉树;所有节点都没有左子节点的二叉树;只有一个节点的二叉树;二叉树的根节点指针为
nullptr
)。
奔跑的亮仔
·
2019-10-17 18:00
二叉树中不相邻节点和的最大值
details/78635887才恍然大悟记录下来:structTreeNode{intval;TreeNode*left;TreeNode*right;TreeNode(intv):val(v),left(
nullptr
袁小方
·
2019-10-16 13:59
c++
二叉树
C++
剑指offer——27二叉树的镜像
/\/\57911镜像二叉树8/\106/\/\11975题解:直接用递归:1classSolution{2public:3voidMirror(TreeNode*pRoot){4if(pRoot==
nullptr
一笔一画一人生
·
2019-10-14 20:00
剑指offer——26树的子结构
那就是直接比较地址了】使用递归;1classSolution{2public:3boolHasSubtree(TreeNode*pRoot1,TreeNode*pRoot2)4{5if(pRoot1==
nullptr
一笔一画一人生
·
2019-10-14 20:00
剑指offer——25合并两个排序的链表
1//使用普通的合并方法2classSolution01{3public:4ListNode*Merge(ListNode*pHead1,ListNode*pHead2)5{6if(pHead1==
nullptr
一笔一画一人生
·
2019-10-14 19:00
剑指offer——26反转链表
,先记住cur->next,然后pre->cur,即可;1classSolution{2public:3ListNode*ReverseList(ListNode*pHead){4if(pHead==
nullptr
一笔一画一人生
·
2019-10-13 23:00
C++随笔
一般情况下,如果new为申请到空间(内存耗尽的情况下),会抛出一个bad_alloc异常通过nothrow可以阻止其抛出异常,用法如下:char*p2=new(nothrow)char;//申请失败后,会返回
nullptr
csdn_WHB
·
2019-09-29 20:16
C++
C++:Memory Management
classLiF;LiF*lif=newLiF();//分配内存给一个LiF对象deletelif;//释放资源lif=
nullptr
;//指针置空,保证安全与C的malloc相比,我们发现,new操作在申请内存的同时还完成了对象的构造
Li_F
·
2019-09-28 18:00
019 C问题集
问题1区别:nullNULL0
nullptr
-12区别及使用:asciiUNICODEutf83int:原码、反码、补码4float:指数存储、小数存储5计算:结构体对齐后大小https://www.cnblogs.com
汁虫
·
2019-09-26 00:00
nullptr
与NULL
NULLNULLcanbedefinedasanynullpointerconstant.ThusexistingcodecanretaindefinitionsofNULLas0or0L,butanimplementationmayalsochoosetodefineitas(void*)0.Thislatterformofdefinitionisconvenientonarchitecture
故事,
·
2019-09-22 13:00
字符串拷贝
=
nullptr
&&src!=
nullptr
);char*ret=dst;if(dst>=src&&dstsrc&&dst=0;--i){dst[i]=src[i];}}else{cou
cjn_
·
2019-09-18 16:36
面试
QT--电子时钟
defineMENU_H#include#include#includeclassmenu:publicQWidget{Q_OBJECTpublic:explicitmenu(QWidget*parent=
nullptr
mahuifa
·
2019-09-14 22:00
008 区别 : NULL
nullptr
/*目录:一:NULL本质二:
nullptr
本质*/一:NULL本质#ifndefNULL#ifdef__cplusplus#defineNULL0#else#defineNULL((void*)0)#
汁虫
·
2019-09-11 19:00
二叉树三种遍历方式的六种实现方法
include#include#includeusingnamespacestd;structNode{intval;Node*left;Node*right;Node(intx):val(x),left(
nullptr
aift
·
2019-09-10 11:00
算法(UVa
+
LeetCode
+
OJ
+
……)
leetcode中提升代码IO速度
leetcode第11题看到一个题解,添加到代码前面,大幅缩减runtime代码为:staticintspeedup=[](){ios_base::sync_with_stdio(false);cin.tie(
nullptr
7900X
·
2019-09-09 00:19
#
LeetCode
leetcode中提升代码IO速度
leetcode第11题看到一个题解,添加到代码前面,大幅缩减runtime代码为:staticintspeedup=[](){ios_base::sync_with_stdio(false);cin.tie(
nullptr
7900X
·
2019-09-09 00:19
#
LeetCode
Mac 安装caffe 错误:make: *** [.build_release/src/caffe/util/db.o] Error 1
local/include/leveldb/status.h:27:11:error:expected';'atendofdeclarationlistStatus()noexcept:state_(
nullptr
频率52HZ
·
2019-09-07 19:47
上一页
54
55
56
57
58
59
60
61
下一页
按字母分类:
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
其他