-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const-5-(2) #284
Comments
Hye |
@Zongshichao 这里 |
确实,应该是const指针的指向不能修改,值是可以修改的,这里可能表达不清楚 |
那我把原文改一改吧 |
laialaodi
added a commit
to laialaodi/CPlusPlusThings
that referenced
this issue
Apr 24, 2023
laialaodi
added a commit
to laialaodi/CPlusPlusThings
that referenced
this issue
Apr 25, 2023
laialaodi
added a commit
to laialaodi/CPlusPlusThings
that referenced
this issue
Apr 26, 2023
laialaodi
added a commit
to laialaodi/CPlusPlusThings
that referenced
this issue
Apr 26, 2023
laialaodi
added a commit
to laialaodi/CPlusPlusThings
that referenced
this issue
Apr 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#include<iostream> using namespace std; int main(){ int num=0; int * const ptr=# //const指针必须初始化!且const指针的值不能修改 int * t = # *t = 1; cout<<*ptr<<endl; }
这里const指针是可以直接修改值的,只是指向不可以改,不需要通过另外的指针修改吧?
The text was updated successfully, but these errors were encountered: