if I want two dimentional dynamic array ,how I can use it
1 2 3 4 5 6 7 8 9 10 11 12 13 14
int N;
cout<<"Enter N:";
cin>>N;
int point[N][2]; //here I take "expression must have constant value" in visual 2010
cout<< endl;
for(int i=0;i<N;i++)
{
cout<<" Enter x , y :";
cin>>point[i][0];
cin>>point[i][1];
}
constint N = 5; // this means constant it's needed for static aloc.
int point [N] [2]; // now work's
OR
1 2 3 4
int N; // when using dynamic aloc. no const is needed for first dim
cin >> N;
int* point = newint [N] [2];
delete point []; //delete dynamic array (not needed for static array's
int N;
cin >> N;
int* point = newint [N] [2];// error a value of type "int(*)[2]" cannot be used to initialize an entity of type "int*"
delete point [];