typedef int A[10];
A *a = new A[1]; //A *a = new A;编译不过
int (*aa)[10] = new int[1][10];
std::cout << "type of A: " << typeid(A).name() << " "
<< typeid(*a).name() << " " << typeid(*aa).name() << std::endl;
int *p = new int(3);
std::cout << "*p: " << *p << std::endl; //3
阅读(736) | 评论(0) | 转发(0) |