I have 2D array of size 10*10.
I need to generate 10 array indexs from array index 10*10 at one time.
How can i do that?
Last edited on
Do you mean generate random indices?
Please give more detail, I do not understand what you need to do.
generate 10 random numeber in [0; 100) range, convert them into 2D indexes.
int index = std::rand() % 100;
int row = index / 10;
int column = index % 10;