64,682
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
using namespace std;
void test1(char a[])
{
cout<<typeid(a).name()<<endl;
}
void test2(char *a)
{
cout<<typeid(a).name()<<endl;
}
char *p1="a";
char p2[]="a";
int main()
{
test1(p2);
test2(p2);
cout<<typeid(p1).name()<<endl;
cout<<typeid(p2).name()<<endl;
system("pause");
}