This should be a trivial excersize, but for some reason I'm getting a problem
when I read a text file. I'm reading a list of strings in text file, with one string per line. The first line has extra characters in the string, the rest of the lines read are fine, and I can't understand where the extra characters come from. Any ideas?
The file format is this...
A
AA
AAN
AAP
AAPL
AAWW
AAXJ
....
...
Code:std::vector<std::string> strSymbolList; std::string s = ""; std::ifstream infile( m_strFileSymbols ); while( std::getline(infile, s) ) { strSymbolList.push_back(s); } infile.close();




Reply With Quote