理解C++中 const 在指针中的用法

int main()
{
int* const array;
const int* array;
int a = 10;
array = &a;//You can't exchange array self , array just is a integar//
*array = 13;//This is error ,you can't exchange pointer array to information//
std::cout << *array << std::endl;

std::cin.get();
}

posted on 2022-11-12 14:21  yangpeiqi  阅读(11)  评论(0编辑  收藏  举报