I have "using namespace std;" at the top which is why I was confused that it worked after I added "std::" in front.
Anyhow, I fixed the problem of reading all the data with nested getline, a solution I found online. However, I'm having a problem trying to store this data in a struct array. (I don't currently have Internet access on the same PC I'm writing the code on, so I can't provide the error I was receiving. So I'm hoping someone can tell me how to correctly store this data, instead of outputting it screen (which works exactly how I want it to)).
"Books" is a struct.
Code:
if ( accfile )
{
string temp;
stringstream subtemp;
while ( getline (accfile, line) )
{
subtemp<< line;
while ( getline (subtemp, temp, ';') )
{
//cout << temp << endl;
void getToken(char Mystring[])
{
char *pch;
pch = strtok(Mystring);
while (pch !=0)
{
Books << pch;
pch = strtok(Null);
}
}
}
subtemp.clear();
}
}