#include<iostream>
using namespace std;
int main(){
// cout << nullptr << endl;//error operand types不支持类型
//int a = nullptr;
int *p = nullptr;
//bool b = nullptr;//error
nullptr_t null = nullptr;
//cout << b << endl;
/*nullptrTest.cpp:11:7: error: ambiguous overload for 'operator<<' (operand types
are 'std::ostream {aka std::basic_ostream<char>}' and 'nullptr_t {aka std::nullp
tr_t}')*/
//cout << null << endl;
return 0;
}
D:\programming\C++>g++ -std=c++11 nullptrTest.cpp
D:\programming\C++>a