Question: Need Help reading in a file using getline and pointers. This is my code and the text file that I am using. Please help! The
Need Help reading in a file using getline and pointers. This is my code and the text file that I am using. Please help!


The code is reading in the file, but the getline is not reading each line independently. I need help of fixing the code, so that it reads each line, one at a time.
Evoid Employee: :Read_in_Employees ifstream inFile2; inFile2.open("employee.txt") string str; while (inFile2.eof)) getline(inFile2, str); getline(inFile2, *Employee_Name); getline(inFile2, str); *commission atof(str.c str )) inFile2.close()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
