As a part of a larger project i need to be able to input an 2D array using a cin statement.
Code i have so far:
1 2 3 4 5
for(i=0; i < maxc; i++)
for(j=0; j < maxr; j++)
cout << "Please enter a integer for the array number: " << "[" << i << "]"
<< "[" << j << "]" << endl;
cin >> np[i][j];
^this just spams the cout statement without allowing any inputs.
I want the program to stop and allow the user to input a number for each individual cell ([0][0] , [0][1] , [0][2]...)