Jump to content
  • Advertisement
Sign in to follow this  
Riraito

ifstream ignoring characters

This topic is 3419 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!