|
This thread is locked; no one can reply to it. |
1
2
|
Arrays to files? |
TeamTerradactyl
Member #7,733
September 2006
|
The basic ">>" operator stops at all whitespace, so it will read in "12345 4345 888" as three separate numbers (or strings of char, or even std::string's). It completely ignores whitespace (spaces and tabs), and newlines. For a school project, we had been asked to read in a line of text, parse the important data, then continue to the next line, etc. The "getline" function will stop at whitespaces (you can also tell it to stop at a certain character, like a space or even a specific character). If you have a stream (like an fstream), the parameters I've used are: Does that help?
|
|
1
2
|