i'm still having trouble reading this info into the proper struct fields... any help would be appreciated... thanks guys...
the "players.txt" file looks something like this...
34, Marcus, Allby, TE, University of Illinois, New England Patriots
54, Thomas, Shelby, QB, Texas A & M, Chicago Bears
The idea is to read number 34 into the "number" field of the struct, the last name into the "last name" field of the struct, and so on... here is the code i have so far, with alot of errors on the "getline" part...
using namespace std;
char lastName ;
char firstName ;
char position ;
char college ;
char nflTeam ;
ifstream playersFile ("players.txt");
cout<<"An error occured while trying to open the file."<<endl;
getline(playersFile, info.number, ',');
getline(playersFile, info.lastName, ',');