https://bbs.csdn.net/topics/110049293
#include <iostream> using namespace std; int main(){ cout << "const变量实践:" << endl; // 必须加 volatile才会改变 const volatile int a111 = 1; *((int*)&a111) = 22222; cout<<a111<< endl;; cout << "a111:" << a111 << endl; register int b = 2; cout << "b:" << b << endl; int *p1 = (int*)&a111; cout << "*p11:" << *p1 << endl; int *p2 = &b; cout << "*p2:" << *p2 << endl; cout << "end." << endl; return 0; }