c++ const问题小记
程序员文章站
2023-12-24 19:43:15
int* a = new int; const int* b = a; const int* a = new int; int* b = (int*)a; const int m = 10; int n = m; const int& p = m; int& q = (int&)p; 以上在vs20 ......
- int* a = new int;
- const int* b = a;
- const int* a = new int;
- int* b = (int*)a;
- const int m = 10;
- int n = m;
- const int& p = m;
- int& q = (int&)p;
以上在vs2019下通过。