Sign in to follow this  

Using A Console Window As A Server With SDL_net

This topic is 2320 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
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 [url=www.sfml-dev.org]SFML[/url]. 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

This topic is 2320 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.

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

Sign in to follow this