Anyone know what code I'd need for these functions? [dos/windows], because the Dev-C++ versions of these functions are pretty ****ed up.
Code:int getch(void) { /* blah blah blah*/ }Code:int kbhit(void) { /*blah blah blah*/ }
Anyone know what code I'd need for these functions? [dos/windows], because the Dev-C++ versions of these functions are pretty ****ed up.
Code:int getch(void) { /* blah blah blah*/ }Code:int kbhit(void) { /*blah blah blah*/ }
To get alternative versions (that probably work as you'd expect), include conio_mingw.h instead of conio.h.
If your problem is to stop the program until the user hit a key, you could use this:
At least this would be ANSII-conform. (In spite of the getch() and kbhit() functions.)Code:void pause(void) { puts("press enter to continue"); getc; }
klausi
When I close my eyes nobody can see me...