NULL、0、nullptr
来源:互联网 发布:java优秀开源代码 编辑:程序博客网 时间:2024/06/10 11:26
参考:http://www.cppblog.com/airtrack/archive/2012/09/16/190828.aspx
编译环境:vs2010
#include <iostream>void bar(char a, char *b){using namespace std;cout<<"char"<<endl;}void bar(char a, int i){using namespace std;cout<<"int"<<endl;}int _tmain(int argc, _TCHAR* argv[]){using namespace std;bar('a', 'b');bar('a', 2);bar('a', 0);bar('a', NULL);bar('a', nullptr);system("pause");return 0;}
运行结果
int
int
int
int
char
0 0
- NULL、0、nullptr
- NULL、0、nullptr
- NULL 0 和 nullptr
- NULL、0与nullptr
- NULL、0、nullptr (C++)
- 0,NULL,nullptr区别
- nullptr,NULL,0
- 0 NULL nullptr浅析
- NULL、0、nullptr 区别分析
- NULL、0、nullptr的区别
- NULL、0、nullptr的区别?
- NULL、0、nullptr 区别分析
- NULL ,nullptr,nullptr_t,0 区别
- NULL、0、nullptr 区别分析
- 探讨 NULL、0、nullptr的意义
- C++中的NULL、0和nullptr
- Item8 Prefer nullptr to 0 and NULL
- NULL,0和nullptr的区别
- (五十四)枚举
- Android 实现ViewPager中页面的手动切换
- android drawable-nodpi的用处
- object-c之自定义UITableViewCell控件的继承和数据的封装
- 深入探究nil和野指针
- NULL、0、nullptr
- hive函数参考手册
- 深入分析Java ClassLoader原理
- [PHP代码] PHP远程获取网页内容
- 单独对车型爬取数据
- kettle批量设置日志
- ubuntu 14.04 use Kinect v1
- 指针
- Mongodb相对于关系型数据库的优缺