char *=NULL时,程序崩溃,后续代码不再执行,析构函数也不调用
#include<iostream>
#include<stdio.h>
#include<string.h>
#include<cstring>
using namespace std;
int main()
{
char * age;
age=NULL;//不能用null
cout<<age;//age为空指针,cout无法执行,程序奔溃
//程序崩溃 后续代码不再执行
cout<<"测试";
return 0;
}