Is there a good way to determine the end of a a line in a text file? I need to find of end of a line in text because all text lines are of different length. I also have to store each word (separated by spaces) into a vector.
abcd: 12345 aaa abcd: 23456 aaa bbb abcd: 34567 aaa bbb ccc abcd: 45678 aaa bbb ccc ddd
I want to separate this into the two following vectors:
vector<string> words: [abdc:,12345,aaa,abcd:,23456,aaa,bbb,abcd:,34567,aaa,bbb,ccc,abcd:,45678,aaa,bbb,ccc,ddd] vector<string> length_of_sentances: [3,4,5,6]
Edited 6 Years Ago by dansnyderECE: n/a