I need to create 2d array in c++.
I can\'t do it by int mas= new int[x][y]; or auto mas= new int[x][y];
I need to create an array dynamical
My advice would be to avoid the pain of multidimensional arrays in the first place and use a struct.
struct Point {
int x;
int y;
}
int points = 10;
Point myArray[points];
Then to access a value:
printf("x: %d, y: %d", myArray[2].x, myArray[2].y);
Depends on exactly what you're trying to achieve, though.