is there a way to get the current courser position.., so if I put that in the position numbers in the gotoxy() function, it'll stay in the same spot?
thnkx
is there a way to get the current courser position.., so if I put that in the position numbers in the gotoxy() function, it'll stay in the same spot?
thnkx
In my compiler (Borland 5.5) I have wherex() and wherey(). Maybe you have these?
I only found them by opening conio.h and looking to see what function prototypes are in there.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
It's not terribly difficult to create a Windows implementation of wherex and wherey with gotoxy from the FAQ.
-PreludeCode:#include <windows.h> COORD coord; void gotoxy(int x, int y) { coord.X = (short)x; coord.Y = (short)y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); } int wherex ( void ) { return coord.X; } int wherey ( void ) { return coord.Y; }
My best code is written with the delete key.
thankx guys