View Single Post
Old 12-1-2012, 12:47 AM   #16
justin_ator
🥓<strong><span style="col
Resident Overseer
FFR Veteran
 
justin_ator's Avatar
 
Join Date: Mar 2007
Location: Kingsport, TN
Posts: 7,648
Default Re: C++ fstream and arrays

Quote:
Originally Posted by emerald000 View Post
I would do some preprocessing on the text file before inputting it in the program. It would make it much easier. Just do a mass search and replace into a format such as:

Username,1,2,3,4,5,6,7

Then, you can use std::getline(stream, number, ',') to get each part one after the other.
That makes sense. This is why I was saying the username part wasn't an issue because we can change the format. Didn't realize you could add those parameters to getline to make it that easy though. Thank you. I'll give it a try when I get done eating and showering.
justin_ator is offline   Reply With Quote