完成下面的程序
横线处空缺了一行程序,要求补全.
这个程序看得我真迷茫,test *p定义了指针,这个指针没有初始化是怎么使用的?
这个空缺的地方是在定义指针之前,真是奇怪呀
#include <iostream>
using namespace std;
class test
{
int X;
public:
test(int a){X=a;cout<<"test "<<a<<endl;}
int GetX(){return X;}
};
void main()
{
_______________
test *p,a[2][3]={{1,2,3},{4,5,6}};
for (int i=0;i<=6;i++,p++)
{
if((p-a[0])%3==0) cout<<endl;
cout<<p->GetX()<<" ";
}
}