Reading text file

I have a text file containing:
int Bob, 2you, john, AdamSmith;
float taxYear=2013, taxRate=29.2.3;

And I need to read it in a way where I analyze:
int
Bob
2you
john
AdamSmith
float
taxyear
2013
taxRate
29.2.3
,
;

So basically instead of reading it line by line, I need to break it into segments. How could I read a text file this way?
Any help please
If the file has been written into the program file use ofstream myfile;
myfile ("file name);
then call out the variables
use ifstream to write the file to the project folder?
Topic archived. No new replies allowed.