//=======================win32平台====================
#include<iostream>
using namespace std;
void fun(int *P)
{
cout<<"函数中"<<sizeof(P)<<endl;//4
}
int main()
{
int A[10];
int* B=new int[10];
cout<<"数组名"<<sizeof(A)<<endl;//sizeof(A) = 10
cout<<"指针"<<sizeof(B)<<endl;//sizeof(B) = 4
fun(A);//4
}
</iostream>
07-14
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交