readInputRecord(ifstream &inputFile,
string &taxID, string &firstName, string &lastName, string &phoneNumber) {
while (!inputFile.eof()) {
inputFile >> firstName >> lastName >> phoneNumber >> taxID;
}
}
As you can see I read in the data like you would a standard read inputfile. The trouble is the data fields can be blank such as, ", ," and include no data-between the parenthesis. I've been reading forums here and elsewhere and a common method seems to be using getline(stuff, stuff, ','), but then that will read in data stopping at the comma. What is the method to include the commas because the output file should read and then output ", ," for the variable if that is read.