
// This is to be used instead of system call "cls"
// (except for the first one)
// inside my terminal applications for Windows.

#include <windows.h>


void cursorHome( void )
{
   HANDLE hStdout=GetStdHandle(STD_OUTPUT_HANDLE);
	COORD coord={0,0}; //x=col, y=line

	SetConsoleCursorPosition(hStdout, coord);

}


int tput00( void )
{
   HANDLE hStdout=GetStdHandle(STD_OUTPUT_HANDLE);
	COORD coord;
	coord.X=0; //column
	coord.Y=0; //line

	if (!SetConsoleCursorPosition(hStdout, coord)) {
   // Uh-oh! The function call failed, so you need to handle the error.
   // You can call GetLastError() to get a more specific error code.
   }


   return 0;
}

