Is this possible? I need to make a 2d array and each element is supposed to have an int array of size 2.
So if I make a 10x10 array I need each index to have a [x, y] where x and y are ints.
Is this possible? I need to make a 2d array and each element is supposed to have an int array of size 2.
So if I make a 10x10 array I need each index to have a [x, y] where x and y are ints.
int array[10][10][2];
Here you have a 3D array. Where the 2D array : array[..][..] has 2 elements inside it.
Or you can use structure.
struct number {
int x;
int y;
};
then :
struct number array[10][10];