Yes, there is a function by the name of "gotoxy" in the non-standard (and non-portable) header file <conio.h> available with Windows C/C++ compilers. Please don't use it except for when you're required to use it in school. It isn't even useful on Windows really since the console is so limited. I don't know why Windows compiler vendors still keep it on life support.
You may want to use the function SetConsolCursorPosition(), which belongs to the windows library. In fact, you can write your own gotoxy() using these function. For example:
#include <windows.h>
void gotoxy( int column, int line )
{
COORD coord;
coord.X = column;
coord.Y = line;
SetConsoleCursorPosition(
GetStdHandle( STD_OUTPUT_HANDLE ),
coord
);
}
int wherex()
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
COORD result;
if (!GetConsoleScreenBufferInfo(
GetStdHandle( STD_OUTPUT_HANDLE ),
&csbi
))
return -1;
return result.X;
}
int wherey()
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
COORD result;
if (!GetConsoleScreenBufferInfo(
GetStdHandle( STD_OUTPUT_HANDLE ),
&csbi
))
return -1;
return result.Y;
}
This code was not write by me, but by Duoas in an old topic: http://www.cplusplus.com/forum/beginner/4234/. Note that this gotoxy() may be use as the function gotoxy() from the conio library.
Hope I've helped you. And sory for my bad english, since it's not my first language.