How can I have ifsteam go to a sertin token/word/symbol and then read all the info tell the next token/word/symbol?
How can I have ifsteam go to a sertin token/word/symbol and then read all the info tell the next token/word/symbol?
string input;
getline(inFile, input, '@'); //use whatever char you want
Last edited by 7stud; 05-10-2005 at 07:40 PM.
seems hes asking how he could start at a symbol and end at one.
basically same thing but one more statement:
use an ignore statement to ignore the all the characters up to your first symbol, then use what 7stud wrote to get the input till the next symbol.
You can certainly use ignore(), but you can also just read in up to the first delimiter, and not do anything with that input.use an ignore statement to ignore the all the characters up to your first symbol, then use what 7stud wrote to get the input till the next symbol.
I need to be able to use more then one simbol becasue I have to tell the difernce per iteam in the file. Can that be done?
Last edited by kingpinzs; 05-11-2005 at 02:35 AM.
You can use whatever symbol you want and change it as often as you like.
Last edited by 7stud; 05-11-2005 at 02:19 AM.
getline(MapFile , line_buffer, 'obj' );
this is what I need but it wont let me do it this way.
I search through the file tell I fond this then end the read when I find 'obj2'
can that be done. I might understand what you are trying to say
Thanks