Sign in to follow this  
whitespace

help making dos program

Recommended Posts

Hello! This is my first time posting here so go easy on me. :P I was wondering if anyone could give me pointers on how to make a DOS program that is multithreaded. I need to separate when I'm getting the input. I don't know the advanced studff, I'm only using a getch() method within a while() loop. So it waits for the input first before it iterates. Any help would be greatly appreciated. The reason for this is that there doesn't seem to be a gotoxy() in CodeBlocks so what I was planning on doing was repeatedly clearing the screen then printing everything. I'm making a game where you try to guess the scrambled word. I want to include a timer that's why I want to know how to do it.

Share this post


Link to post
Share on other sites
oh no.. is there an alternative? I mean how do I handle the input in such a way that the main while() statement continues to loop? I've seen some DOS games, you know, the one where the graphics are just letters and numbers.

Share this post


Link to post
Share on other sites
Quote:
Original post by whitespace
Console!! That's the word! I'm sorry.. I got used to the term dos.. hehe.. funny that I've seen that word in codeblocks.. Sorry bout that.


I'm sure at least 90% of everyone here has made that mistake before [grin]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It's just a compilation flag thing. The linker needs "/SUBSYSTEM:CONSOLE"; look it up in the help file or on MSDN. Just avoid any graphics calls, make sure you use "_beginthread()" instead of "CreateThread()" and you should be fine.

Share this post


Link to post
Share on other sites

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