指针变量图解

mac2022-06-30  27

// main.cpp // 指针 // Created by mac on 2019/4/4. // Copyright © 2019年 mac. All rights reserved. // 1.指针变量只用于存储内存地址,根据内存地址去查找里面存储的数据。 #include <iostream> 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

如果图片资源加载失败,请科学上网。

转载于:https://www.cnblogs.com/overlows/p/10656668.html

相关资源:指针详解(图文并茂)
最新回复(0)