Does anyone know how to read a whole line into a structure?
I'm trying getline and failing.
I'm getting sci. notation. Why doesn't this code work? Thanks.
The text file includes:
Plain Egg
1.45
Bacon and Egg
2.45
Code:void getData(menuItemType menuList [], ifstream& inFile) { int counter=0; while (inFile) { getline(inFile,menuList[counter].menuItem); getline(inFile,menuList[counter].menuPrice); counter++; } }



LinkBack URL
About LinkBacks



!).