//: cpp代码测试
// 指针常量和常量指针
const int *p;
int i = 20, j = 30;
p = &i;
cout << *p;
p = &j;
//*p = j;错误
int *const pp = &i;
*pp = j;
//pp = &j;错误
//: cpp代码测试
// 枚举类型
enum depart{d1, d2, d3};
depart x = d2;
cout << x << endl;
//: cpp代码测试
// 指针常量和常量指针
const int *p;
int i = 20, j = 30;
p = &i;
cout << *p;
p = &j;
//*p = j;错误
int *const pp = &i;
*pp = j;
//pp = &j;错误
//: cpp代码测试
// 枚举类型
enum depart{d1, d2, d3};
depart x = d2;
cout << x << endl;