How can I read from a file having the last name both Smith and Jr. without errors? Whenever I run the program it causes an error with Jr. in the file but when I remove it from the input file it doesn't have errors. This is how I read it
void Read_Student(Student & Temp , ifstream & fin){
fin >> Temp.FirstName;
fin >> Temp.LastName;
fin >> Temp.Id;
fin >> Temp.Quiz;
for (int i = 0 ; i < 6 ; i++)
fin >> Temp.Test[i];
}
Willy Smith Jr.
222114444 90 73 67 77 70 80 90
The answer to the question is available in the PDF file https://assignmentexpert.com/https://assignmentexpert.com/homework-answers/programming-answer-37646.pdf
Comments
Leave a comment