Hello,
iam having trouble with reading a text file that contains , [ ]
eg. 3715,4[9]
4356,3[7,3]
char c;
int events[12][12];//[row][col]
ifstream infile;
infile.open("test.txt");
while (!infile.eof())
{
for(int j=0;j<12;j++)
{
for(int k=0; k<12;k++)
{
if(c!=']')
{
infile >> events[j][k];
infile.get(c);
}
else events[j][k] = -1;
}
}
infile.get(c);
} //end while
infile.close();
for some reason it doesn't jump out of the k loop. j always stays 0
Thanks.