#include<iostream>
using namespace std;
void get(int a)
{
cout<<__func__<<"int"<<endl;
}
void get(int *a)
{
cout<<__func__<<"int*"<<endl;
}
int main()
{
int *p =NULL;//(void*)0;
int *q = nullptr;//C++11的空指针定义
get(NULL);
get(nullptr);
// get((void*)0);
}
C++ nullptr
最新推荐文章于 2024-10-02 23:08:36 发布