Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Redirect standard output

Sign in to follow this  


I got working on my resource management system today. I've made some pretty good progress too but that's not really interesting is it? To be honest that's just donkey work.

Something slightly more interesting I got to work today was redirecting the C++ standard streams cout and cerr to my console window. The console window is rendered in-game using a heavily customised Cegui. Not too shabby eh? It's fast and simple, I think the whole thing is only in the region of 12 - 14 lines of code.

It's funny actually how little the majority programmers seem to know about stl. I don't claim to know everything about stl, but I'm confident enough with templates and the stl syntax to step through the library a bit and figure out what's going on. I have some rather beefy reference books at my disposal too. But I think a lot of programmers just think of the stl as a 'black box' that just always works. I was pleasantly surprised today to work out how to do this and how simple and clean the solution was.

The moral of todays blog entry? Learn your stl, learn it well!
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!