Reading from text files and extracting items

Nov 30, 2015 at 2:02am
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
Nov 30, 2015 at 2:12am
Could you post the code? We can help you better to understand what is the problem.
Nov 30, 2015 at 3:32am
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.