摘要: 让指针指向一个常量对象,这样可以防止使用指针来修改所指向的量 将int对象a,转为常量对象,有指针c指向 #include<iostream> using namespace std; int main() { int a = 3; const int* c = &a; cout << *c << 阅读全文
posted @ 2022-02-20 17:19 xiecl 阅读(48) 评论(0) 推荐(0) 编辑