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!

Need Help reading in a file using getline and pointers. This ismy 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!