Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ifstream file;
- file.open('data.txt');
- string n = '';
- int g = 0;
- while(!file.eof())
- {
- file >> n >> g; // read string and number at same time
- // do something with them
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement