Jump to content
  • Advertisement
Sign in to follow this  
Kekko

Creating an iostream

This topic is 5037 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

How do I declare an iostream? All I get is a C2512 saying there's no appropriate constructor for the class. Only the fstreams work.

Share this post


Link to post
Share on other sites
Advertisement
Clicky

What sort of iostream do you want? Use fstreams to handle files, cout to sent to the console, streamstreams for strings, etc. It all depends on what you want to do.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kekko
How do I declare an iostream? All I get is a C2512 saying there's no appropriate constructor for the class. Only the fstreams work.

You're trying to inherit from iostream aren't you, well you need to pass it a std::streambuf* using a constructor specifier.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!