How to separate a column of numbers from string lines of varying lengths in C++? -
Thanks in advance for your help I am looking to read the file that has the following format: < Pre> If I use the line reading method by line: file & gt; ; & Gt; Number [i] & gt; & Gt; Str This does not work clearly, because the string is empty. Does anybody have any idea how can I do this? I am interested in saving numbers in only one array. Thanks! read a line using fstream and stop it on the given character (such as a location): to If the delimiter is detected, it is removed and released, i.e. it is not stored and after this the next input operation will begin. After this, you will convert the first part of the line, convert it to 100 each row has 23452 different numbers 30 words
Eastern & amp; Gateline (cell * s, stream no, four delimited);
int or other number format, to catch the remaining line, the other
getline < / Code> (this automatically clears the character on the new line), then repeat.
Comments
Post a Comment