神必
#include<cstdio>
#include<iostream>
using namespace std;
int main() {
//指向常量的指针,可以变地址,不能变内容
const int *A = new int(1);
A = new int(2);
//*A = 3; nope
//----------------------同上
int const *B = new int(1);
B = new int(2);
//-----------------------指针常量 ,可以改内容,不能改地址,类似于final
int* const C = new int(1);
*C = 2;
//C = new int(3); nope
//-----------------------指向常量的指针常量 不能改地址 && 不能改内容
const int* const D = new int(2);
//D = new int(2); nope
//*D = 3 nope
return 0;
}