#include <iostream>
using namespace std;
void main()
{
//int *iPtr = NULL;
//iPtr = 5; //编译错误:error C2440: “=”: 无法从“int”转换为“int *”
////*iPtr = 5; // xxx.exe 中的 0x004113e8 处未处理的异常:
////0xC0000005: 写入位置 0x00000000 时发生访问冲突
//cout << iPtr << endl;
//int *iPtr2;
//*iPtr2 = 3; // Run-Time Check Failure #3
////- The variable 'iPtr2' is being used without being initialized.
char *cPtr = NULL;
cPtr = "a";
printf("%x\n", cPtr);
cout << cPtr << endl;
char *cPtr2;
cPtr2 = "b";
printf("%x\n", cPtr2);
cout << cPtr2 << endl;
/*
417808
a
417800
b
请按任意键继续. . .
*/
}