Get stringstream with separator!!!
I've read some example for the get Int or char for stringstream with ' ' (space) separator.
for example:
Code:
string line = {1 2 3 4 5 6};
the library will auto get each number as an Int and put into vector
Code:
vector<int> numbers;
The question is "How i get (read) from file and get words
- space separator
- "<" or ">" separator (the program will ignore this and assume it as a space)
- with "-" (hyphen) a numbers of word will become one word (Today-is-a-nice-day) means no separator
- With "." (end period) - here is a difficult part
- first: 0.2 0.2a is read by 0.2 and 0.2a
- second: .2 a.2a .2 (2 spaces) is read by 2 2a and 2 (it will check the char before the "." to be blank.
Could anyone give me an idea of how to read from a file and get char as description.
Thanks, regard