Answer to Question #37646 in C++ for Sara

Question #37646
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
1
Expert's answer
2013-12-10T09:52:14-0500
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-37646.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS