关于数组和指针的问题
int* p;
int **pp;
int arr[100];
p=arr; //正确
pp = &arr; //错误
printf("a1=%p,a2=%p\n",arr,&arr); //而打印arr和&arr的结果都一样?
谁能解释一下&arr到底是什么吗?而为什么打印出的结果一样呢?
--------------------Configuration: Text1 - Win32 Debug--------------------
Compiling...
Text1.cpp
C:\Documents and Settings\superSS\桌面\Text1.cpp(9) : error C2440: '=' : cannot convert from 'int (*)[100]' to 'int ** '
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
执行 cl.exe 时出错.
Text1.exe - 1 error(s), 0 warning(s)
根本不能运行啊,LZ怎么输出???