guys, can you tell me whats wrong with this code. I included everything, no compiler errors but I need to read the number, then the phrases underneath it. look at my code and the contents of my file.
The stuff in my code
Code:
ifstream file_op ("Hello.txt");
while(!file_op.eof())
{
file_op>>line_num;
for(temp = 0; temp <= line_num; temp++)
{
file_op.getline(question[temp].str, 200);
cout<<question[temp].str<<endl;
}
}
file_op.close();
stuff in file "Hello.txt"
Code:
0
Hello world reporting from file
0
Roger!