Reading from text files and extracting items

I am reading values from a text file and was wondering how I would extract each item and store it as a variable.

Example:

00003, 0002, Vegas
Storing each item as a different variable
Could you post the code? We can help you better to understand what is the problem.
All i'm doing right now is outputting the file's contents

1
2
3
4
5
6
7
8
9
10
11
12
13
if (readFile.is_open())
		{
			while (!readFile.eof())
			{
				readFile >> output;
				if (istringstream(output) >> temp)
				{

				}
				cout << output << endl;	
			}
		}
		readFile.close();
Topic archived. No new replies allowed.