Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //a better way to writing file loops
- //read in before the loop starts
- ifstream inFile("in.txt");
- int readVar = 0;
- inFile >> readVar;
- while(inFile)
- {
- //do stuff with readVar
- inFile >> readVar //re-read information in
- }
Advertisement
Add Comment
Please, Sign In to add comment