ifstream ignoring characters

Started by
0 comments, last by Cornstalks 15 years, 1 month ago
is there a way to have the >> operator of fstream ignore special characters other than whitespaces. I would like to have it ignore ',' and ';' and I just wanna make sure I don't have to write my own routine for it.
Advertisement
While there might be better ways to do this, I would read the file into a std::string, and then use boost tokenizer to break it up into the segments you want. I don't know of another way to do it, but I hope to see some clever alternatives.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

This topic is closed to new replies.

Advertisement