12-1-2012, 12:47 AM
|
#16
|
🥓<strong><span style="col
Resident Overseer
Join Date: Mar 2007
Location: Kingsport, TN
Posts: 7,648
|
Re: C++ fstream and arrays
Quote:
Originally Posted by emerald000
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.
|
|
|