I have question, why when I don't put the "inFile.ignore()" line, the program doesnt work. What is the thing that the line ignore?
while(1){
inFile.getline(name,50);
inFile>>ass1>>ass2>>ass3;
inFile.ignore();
if(inFile.eof()) break;
cout<<name<<" "<<ass1<<" "<<ass2<<" "<<ass3<<endl;
}
here is the content of the input file :
akmal
3 2 1
akmal hisyam
1 2 3