指针变量图解

指针图解
``` // main.cpp // 指针 // Created by mac on 2019/4/4. // Copyright © 2019年 mac. All rights reserved. // 1.指针变量只用于存储内存地址,根据内存地址去查找里面存储的数据。

include

using namespace std;
int main(int argc, const char * argv[]) {
int a=15;
int *p;
int *q=&a;
p=(int *)a;
cout<<a<<endl;
cout<<p<<endl;
cout<<&a<<endl;
cout<<q<<endl;
return 0;
}

##Tips
- 如果图片资源加载失败,请科学上网。
posted @ 2019-04-04 19:20  芷恬  阅读(452)  评论(0编辑  收藏  举报