integer integer integer integer string
integer integer integer integer string
and so on...
i need to assign these values of the integers from the file into a multidimensional array.
i know how to assign values automatically in a multidimensional array with counters and FOR LOOPS, but i'm having a hard time on this. how can i skip over the strings and go onto the new row for the next set of 4 integers?
so far i have this for automatically assigning values:
for(int row = 0; row <= 25: row++)
{
for(int column = 0; column <= 4: column++)
{
array[row][column];
}
}
side note: the 5th column would be the strings i'm trying to avoid
this is for reading values:
ifstream readIn("classData.txt");
int test1;
int test2;
int test3;
int test4;
while(readIn >> test1 >> test2 >> test3 >> test4)
{
cout << test1 << "\t" << test2 << "\t" << test3 << "\t"
<< test4 << endl;
}
side note: 25 rows total, only 1st row of integers print. stops run early because of string
how can i combine these with two without a problem?