What do i need to include for gotoxy()? I tried conio.h, and it's not there. And what are the commands for using arrow keys?
Thank you!
What do i need to include for gotoxy()? I tried conio.h, and it's not there. And what are the commands for using arrow keys?
Thank you!
This war, like the next war, is a war to end war.
You might try this
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
I remade it myself. Its very similar to what you suggested.
Code:void dc(char szChar, int X, int Y) { HANDLE OutputH; COORD position = {X, Y}; OutputH = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(OutputH, position); cout << szChar; }
This war, like the next war, is a war to end war.
this is the same as above except more efficient...
use getch() or getche() depending on your compiler for input with the arrow keys and look at asciitable.com for ascii valuesCode:void gotoxy(short x, short y) { COORD coord = (x, y); SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); }
would the arrow keys be DC1, DC2, DC3, and DC4. Dc is device controls.
This war, like the next war, is a war to end war.