MedicineCabint
2018-10-27 01:43C++中关于两个*,即“**”的问题
#include
#include
using namespace std;
int main()
{
int i = 5;
int *p;
int **q;
cout << i<<'\n' << &i << endl;
p = &i;
(*q) = p;
cout << p << endl << *p << endl<<&p<<endl<<&*p<<endl;
cout << q << endl << *q << endl << **q << endl;
cout << &q <<endl << &(*q);
}
代码如上,为什么在编译的时候会说:使用了未初始化的局部变量“q”呢,求大神指点
- 点赞
- 回答
- 收藏
- 复制链接分享
4条回答
为你推荐
- [C++] 如何将两个constant string 填入vector?
- c++
- 1个回答
- C++11一个关于字符串读入的玄学问题
- c++
- 1个回答
- c++如何设置一次打两个中括号?
- c++
- 1个回答
- DevC++初学者的两个问题
- c语言
- 1个回答
- C++ 两数之间的所有整数
- c++
- 5个回答
换一换