【強(qiáng)烈推薦】4小時(shí)徹底掌握C指針 - 頂尖程序員圖文講解 - UP主翻譯校對(duì) (
2023-02-19 10:15 作者:聰明的陽(yáng)懿 | 我要投稿

P1 指針的基本介紹:
指針是一個(gè)變量,它存放著另外一個(gè)變量的地址。
Pointer is a variable that store the address of another variable.
code:
int a;
int *p;
p=&a;
a=5;
cout<<p<<endl;??//p=&a=a的地址
cout<<&a<<endl;?//a的地址
cout<<&p<<endl;?//p的地址
?cout<<*p;????//指針?biāo)赶虻刂返闹怠猘的值
? ?*p=8;??????//可以修改a的值。
標(biāo)簽: