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
单例模式模板
mp_Singleton);mp_Singleton=static_cast(this);}~Singleton(){assert(mp_Singleton);mp_Singleton=
nullptr
;
田振靓
·
2018-08-05 18:07
C++
设计模式
模板
Android ndk获取手机内部存储卡的根目录方法
如下所示:jclassenvcls=env->FindClass("android/os/Environment");//获得类引用if(envcls==
nullptr
)return0;//找到对应的类
裸睡的蛐蛐
·
2018-08-01 09:34
如何让模板函数 对不同类型的参数做不同的处理
from){//如果是std::is_convertable_v是true就用static_cast,否则dynamic_cast}方案1.SFINAE和std::enable_iftemplate>*=
nullptr
killer4747
·
2018-07-28 11:58
C++
Leetcode206||剑指offer16:反转链表
三种常用方法:顺次修改、头插法、递归法顺次修改:ListNode*reverseList(ListNode*head){if(head==
nullptr
||head->next==
nullptr
)returnhead
hlk09
·
2018-07-23 11:57
Leetcode数据结构
剑指offer
Qt|C++-OpenGL绘制三角形带
include"ui_MyFristMSVCQt.h"classMyFristMSVCQt:publicQWidget{Q_OBJECTpublic:MyFristMSVCQt(QWidget*parent=Q_
NULLPTR
IT1995
·
2018-07-22 22:14
Qt
C/C++
OpenGL
Windows核心编程:第12章 纤程
//#include"stdafx.h"#include"第12章纤程.h"LPVOIDg_Covert=
nullptr
;DWORDg_index=0;VOIDWINAPIFiberFun(LPVOIDlpFiberParameter
gongluck
·
2018-07-19 14:00
C++ string互转wstring/Unicode互转ANSI/Unicode互转UTF8
wstring&str){char*pElementText;intiTextLen;//宽字节转多字节iTextLen=WideCharToMultiByte(CP_ACP,0,str.c_str(),-1,
nullptr
轻轻的风wind
·
2018-07-16 10:46
C++基础
C++ string的简单实现
usingstd::ostream;classString{private:/*data*/char*data;//字符串size_tlength;//长度public:String(constchar*str=
nullptr
Catcher07
·
2018-07-16 09:28
不修改数组找出重复的数字
intgetDuplication(constint*numbers,intlength){if(numbers==
nullptr
||length=s
无名_1989
·
2018-07-03 09:49
算法
查找
0到n-1中缺失的数字
intGetMissingNumber(constint*numbers,intlength){if(numbers==
nullptr
||length>1;if(numbers[middle]!
无名_1989
·
2018-07-02 09:23
算法
查找
680. 验证回文字符串 Ⅱ
staticconstauto____=[](){ios::sync_with_stdio(false);cin.tie(
nullptr
);returnnullpt
Viewz
·
2018-06-14 17:38
leetcode
使用注册表关闭Windows防火墙
#include"stdafx.h"#includeint_tmain(intargc,_TCHAR*argv[]){HKEYhKey=
nullptr
;LONGlRet=NULL;char*szSubkey
FFE4
·
2018-06-11 15:12
心情杂货铺
C++中的单例模式
单线程版本templateclassSingleton{public:T&getInstance(){if(value_==
nullptr
){//判断语句vaule_=newT();}return*value
DD_Dddd
·
2018-06-11 10:12
C++
c++ 实现对字符串按字符分割源代码
---------获取按ch分割的子字符串--------------------------std::vectorsplit(char*pStr,charch){std::vectorvec;if(
nullptr
忘记江南
·
2018-06-08 16:13
c++
字符串
分割
删除链表中的重复节点(重复的保留一个)
ListNode*deleteDuplication(ListNode*pHead){if(pHead==
nullptr
)returnnullptr;autop=pHead,pn=p->next,pnn
jirryzhang
·
2018-06-03 20:24
C++
算法
[2018年6月1号]C++ primer 课后练习 第十六章 模版与泛型编程
16.26用函数指针来实现删除器,想不出来时候多睡一会template*>classmy_shared_ptr{public:my_shared_ptr(Funcfunc=0):data(
nullptr
xinyYoung
·
2018-06-01 08:24
C++基础
C++11新特性(25)- 更快的swap
=
nullptr
){ deletedata;
面向对象思考
·
2018-05-22 20:33
C++
C/C++面试题—实现MyString类
值得每个C++程序员注意的时,如果参数有传递引用,一定要有非空验证,因为引用帮我们封装了指针,MyString*pStr=
nullptr
;将*pstr传递给引用参数是不会报错的,
李四老师
·
2018-05-19 17:42
【Language_C++】
【面试相关】
OpenGL绘制三角形
include#include#pragmacomment(lib,"glfw3.lib")//链接金泰哭#pragmacomment(lib,"glfw3dll.lib")GLFWwindow*window=
nullptr
单音GG
·
2018-05-16 16:18
OpenGL
根据二叉树的先序遍历和中序遍历序列建树
includeusingnamespacestd;intN;stringxian,zhong;structnode{chardata;intd;node*lson,*rson;node(){lson=rson=
nullptr
Apale_7
·
2018-05-14 16:08
数据结构
删除链表中的节点
=
nullptr
)
BridgeMa
·
2018-05-08 15:33
C++
剑指offer- 之字形打印二叉树
方法一、层次打印,偶数行反转、vector>Print(TreeNode*root){queueq;vector>V;if(root==
nullptr
)returnV;q.push(root);inteven
csdn_lzw
·
2018-04-26 20:45
编程题
c++11 新特性一览
longlong类型:新增的数据类型列表初始化:允许变量用{}初始化,对于stl容器很方便
nullptr
常量:为了统一大家判定指针为空的写法习惯,有些写法在特定情况下会有问题:点击打开链接constexpr
D_Guco
·
2018-04-22 20:38
c++学习
C++中NULL和
nullptr
的区别
voidfunc(void*t){cout<<"func1"<
nullptr
ei1994
·
2018-04-19 15:06
C++
AC自动机(hdu2222)
,pri;intT,n;structNode{intcnt;Node*next[26];Node*fail;Node(){cnt=0;memset(next,0,sizeof(next));fail=
nullptr
Apale_7
·
2018-04-18 22:44
字符串
剑指offer之链表中倒数第k个结点
思路:定义两个指针,一快一慢,快的先走k步;具体代码:(C++)structListNode{intval;ListNode*next;ListNode(intx):val(x),next(
nullptr
瀛洲客
·
2018-03-29 18:54
面试题
C++单例模式的两种写法
#include/*方法一,将指向静态对象的指针私有,获取静态对象时分配内存*/classA{public:staticA*getInstance(){if(m_pA==
nullptr
){m_pA=newA
HeavenMint
·
2018-03-16 09:01
c++
虚幻4中用C++代码创建UI控件
UserWidgetvoidAUserWidgetContainer::CreateUserWidgetInstance(EUserWidgetname,constFStringpath){UClass*widgetClass=LoadClass(
nullptr
NeverMore_Mr
·
2018-03-08 14:53
虚幻引擎
设计模式第三周
解决的是性能问题问题:以上写法单线程是安全的;而线程则不安全解决:加锁(但锁的代价过高)Singleton*Singleton::getInstance(){Locklock;if(m_instance==
nullptr
zslgg
·
2018-01-15 00:07
STL学习笔记(二)——C++11新特性
表达式内的空格//“在两个template闭符之间放一个空格”的要求已经过时了:std::vector>;//OKineachC++versionstd::vector>;//OKsinceC++112.
nullptr
fifbro
·
2017-12-29 18:00
STL编程
剑指offer 编程题(2):字符串替换
classSolution{public:voidreplaceSpace(char*str,intlength){if(str==
nullptr
&&length0){if(str[n]==''){str
coolwriter
·
2017-12-13 11:40
编程题
剑指offer
ODBC总结
引用头文件:sql.h、sqlext.h、sqltypes.h添加库文件:odbc32.libodbccp32.lib1.定义环境变量:SQLHENVhenv=
nullptr
;//环境句柄SQLHDBChdbc
heshaai6843
·
2017-12-13 09:00
数据结构——图
文中代码均已在VS2015上测试,空指针均为
nullptr
(C++11)。参考来源:慕课网图分类:有向图。无向图顶点,弧,弧头。
静候那一米阳光
·
2017-12-04 07:00
WebRTC -- IP地址
addresses){return-1;}addresses->clear();structaddrinfo*result=
nullptr
;str
china_jeffery
·
2017-11-29 16:46
☆
WebRTC
☆
网络编程
WebRTC从入门到精通
5. 链表+逆序打印单向链表
=
nullptr
){tmp.push(p_node);p_node=p_node->next;}while(!
Myth52125
·
2017-11-03 18:00
5. 链表+逆序打印单向链表
=
nullptr
){tmp.push(p_node);p_node=p_node->next;}while(!
Myth52125
·
2017-11-03 18:00
D3D 基础彩色矩形的绘制
#include#include#pragmacomment(lib,"D3D9.lib")constTCHAR*kClassName="Rectangle_D3D";IDirect3D9*d3d9=
nullptr
Tengjinshu
·
2017-10-29 23:52
D3D
数据结构算法——双向链表
双向链表结构/*双向链表节点结构*/structNode{intdata;Node*next,Node*pre;Node(){data=0;next=
nullptr
;pre=nu
Dangkie
·
2017-10-29 11:50
数据结构与算法
数据结构算法——双向链表
双向链表结构/*双向链表节点结构*/structNode{intdata;Node*next,Node*pre;Node(){data=0;next=
nullptr
;pre=nu
Dangkie
·
2017-10-29 11:50
数据结构与算法
二叉树前序、中序、后序遍历的非递归写法
顺便整理下.前序和中序遍历的非递归写法都比较好实现,后序遍历稍微复杂一些.数据结构定义:structNode{charc;pNodelchild,rchild;Node(charc,pNodelchild=
nullptr
FlushHip
·
2017-10-25 18:07
数据结构
数据结构
比特币源码研读(7)-main函数(6)
{PrintExceptionContinue(
nullptr
,"AppInit()");}即如果try中的代码出现异常,则会被catch捕获。在这里我们先分析try中
electroman
·
2017-10-18 10:10
通过代码静态工具检查看编码细节
=
nullptr
判空前,已经有使用pT->a()了,判空就不起作用了,如果有异常,已经崩溃了
春夜喜雨
·
2017-10-12 21:43
C++
管理
【cocos2dx】单例
staticRoleCardController*getInstance();.m//1.实现单例方法,首先我们要有一个静态对象staticRoleCardController*roleCardController=
nullptr
当白
·
2017-10-10 10:05
cocos2dx
07_
/*从字符串中获取尽可能多的ipv4地址*/voidgetIP(char*ip){if((
nullptr
==ip)||(strlen(ip)12)){return;}char*s=ip;longlongsum
a2604539133
·
2017-10-05 20:21
字符串练习
int operator *() 和operator int*()的区别
NULL0和c++11
nullptr
简单描述就是因为c语言有隐士类型转换所以(void*)可以转化为任意一种指针可是c++并不提供这种方式所以在一些赋值操作中要强转,为了兼容和使用上的一致就定义了c++
qq_37058442
·
2017-09-27 23:25
c++
priority_queue简单用法
definemax_char_num10typedefstructtreeNode{intfreq;charch;treeNode*lchild,*rchild;treeNode():freq(0),ch('\0'),lchild(
nullptr
西境的小狮子
·
2017-09-09 22:17
C语言
二叉树的遍历
二叉树结点structBSTreeNode{intval;BSTreeNode*left;BSTreeNode*right;BSTreeNode(intx=0):val(x),left(
nullptr
)
南风知我_
·
2017-09-05 19:25
C++冒泡排序递归&&非递归版本
voidBubbleSort(intarr[],intlength){if(arr==
nullptr
||lengtharr[j+1]){swap(arr[j],arr[j+1]);}}}}voidBubbleSortRecur
wh_585
·
2017-09-04 11:42
算法及数据结构
c++语言
递归
冒泡排序
二叉树的遍历
=
nullptr
)nodes.push
扎Zn了老Fe
·
2017-09-02 11:52
20170825_malloc和new申请内存失败后的处理
\r\n");}free(buffer);buffer=
nullptr
;//new的写法try{char*buffer=newchar[1024];}catch(...){printf("o
stormchenmeng
·
2017-08-25 08:39
C++程序员面试宝典
上一页
57
58
59
60
61
62
63
64
下一页
按字母分类:
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
其他