C++指针的引用理解 指针可以作为参数传递直接修改所指的变量的值,如下代码:void change(int *p){ *p = 20; }int main(){ int a = 10 ; int * pa = &a; change(pa); cout<<"a = "<<a<<endl;//输出20 cout<<"*pa = "<<*pa<<endl;//输出2 C-C++ 2023-12-05 52 点赞 0 评论 78 浏览