大家好,又见面了,我是你们的朋友全栈君。
#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);
}
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/126122.html原文链接:https://javaforall.net