?

Log in

No account? Create an account
Bubo

July 2011

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      
Powered by LiveJournal.com

23rd July 2011

Bubo

A Question For The Programmers On My Friends List (Particularly Those Who Use Linux)

So I got back from programming camp yesterday (which is just like regular summer camp, but more fun), plugged my shiny new thumb-drive into my computer (which runs Ubuntu), spent a few minutes trying to figure out how G++ works, and attempted to compile the game I had written at camp.
It told me that conio.h was most definitely not a real thing. "Oh," I thought "conio.h must be Windows only. A quick Google search and I'll have my game working in no time."
Several hours later, the game wasn't working.

Various sites that my Google search turned up suggested I use curses.h for getch() and though I didn't find nearly as much material regarding system("cls"), one site did suggest cstdlib, so having #included these things, commented out conio.h, and replaced my system("cls")s with system("clear")s, I tried once more to compile my game.
"Success!" I thought, since there were no errors that I could see.
Then I tried running the thing

It printed the the maze and both characters (the player-controlled @ and the random-number-controlled W), but when I attempted to move my character, the letters I use for movement keys appeared to the right of the maze and nothing else happened.

So, long story slightly less long, my questions are these:
How do I make getch() and system("cls") work with g++?
Alternatively, short of just running WiNE, is there another compiler I can use for this?