//GOTO XY
//By DreamVB

#include <iostream>
#include <Windows.h>
using namespace std;
using std::cout;
using std::endl;

HANDLE con = GetStdHandle(STD_OUTPUT_HANDLE);

void gotoxy(int x, int y){
	COORD pos;
	pos.X = x;
	pos.Y = y;
	if (con != NULL){
		SetConsoleCursorPosition(con, pos);
	}
}

int main(int argc, char *argv[]){
	gotoxy(5, 4);

	cout << "Goto XY Example" << endl;

	system("pause");

	return 0;
}