hi, currently i have no problem retrieving each line in the text file using the following code:


char buffer[256];
ifstream myList("List.txt");
if (! examplefile.is_open())
{ cout << "Error opening file"; exit (1); }

while (! myList.eof() )
{
myList.getline (buffer,100);
cout << buffer << endl;
}

However, im trying to abstract each value separated by a comma. heres an example of a line in the text file

"mr john", 42, 8, "likes banana", true

"miss john", 40, 0, "likes papaya", false

i would like to do something tp retrieve the values and store them like this...

Name = mr john;
age = 42;
workingHrs = 8;
f_food = "likes banana;
active = true;

thanks in advance.