Jump to content
  • Advertisement
Sign in to follow this  
The Magical Pot

Using A Console Window As A Server With SDL_net

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

I found out a while ago that you could do network programming with SDL_net, now I got around to playing around with that part of the SDL library. Now that I compiled a test server I noticed that "cout" didn't work when I included SDL, I then went over to the web and googled for a solution, I found something on the SDL webside that explained that SDL redirects cout to stdout.txt and then showed some solutions, but nothing really worked. Now my problem is that I want to bind cout and cin to a console window, but SDL redirects cout and cin to stdout.txt, how do I redirect the streams? Everything in my application works fine, it's just the console problem. My IDE of choise is Dev-C++ by the way.
My purpose for posting this is that I hope that someone nice could give me a more close help than the SDL webside did.

Share this post


Link to post
Share on other sites
Advertisement
I can't answer your question, but I remember back in the days when I used to do SDL, I had the same problem with SDL_net. Couldn't figure it out, didn't either because I found something better.

Here's what you do, don't use Dev C++, it's way outdated and it's a nightmare to manage.
Download Visual C++ express, or you can do the Visual Studio 2010 Ultimate trial, but VC++ express works for you.

Move over to SFML. It has an all in one package and the network part is piss easy to get into and they actually have good tutorials.

SFML is better, faster, easier and more robust than SDL which is slowly rotting away.

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!