@
torchi12
Yes, my way is like that, but doesn't do anything evil.
You want to do something OS-specific, so you cannot complain that your code must be different for different OSes.
On Ubuntu, link with
g++ your stuff here -lcurses |
and the code will run properly. (You must have the ncurses development library installed, BTW.)
I just noticed that I didn't give you color information. This is a bit more difficult than other things... Can you get along without it? (If not, I'll help you out, but remember that it isn't easy.)
You might want to consider using the
NCurses library directly... Then your code will be nearly identical for both Windows and *nix...
@
Rtme
Oh no! Too bad I didn't know that!
All the console hatred
Disch puts out is just opinion, however well-informed.
Many
good games have been written for use on console systems, and some still are.
Programming the console is notoriously difficult, and I dare say that the learning curve is a little higher than nice object systems like SDL and SFML. But that doesn't mean that elementary programming exercises like a simple hangman game are not worth one's time, and they are significantly easier than having to deal with either of the other systems at this stage.