Hi! I was wondering if anyone might know what header file must be included to use the command gotoxy in c++. Thank you for your help!
Hi! I was wondering if anyone might know what header file must be included to use the command gotoxy in c++. Thank you for your help!
The question would be, what compiler are you using. This is not part of the IEC/ISO C++ standard definition as far as I know.
if you have it... them it normally resides in <conio.h>
if you dont have it..... i.e. msvc.... you can write it yourself.
Code:#include<windows.h> void gotoxy(int x, int y) { COORD point; point.X = x; point.Y = y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),point); }
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Yeah, it's in Conio.h, which isn't on most compilers. I tried using it's textcolor function once, but I realized that header wasn't there, so I gave up. It's probably posted somewhere on the internet though...
Think out of the box! Open Source rules!
-Breach23