我想要在C++中构造一个数组A[10],怎么写代码?
int main(){new AList A(10);for(int i=0;i<10;i++)cout<<A[i]<<endl;}
type arrname[10]eg:int a[10]
int a[10]={0,1,2,3,4,5,6,7,8,9};
可以用new关键字
int *a = new int[10];
或者用c的方法
int a[10]={0};