欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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下通过。

上一篇:

下一篇: