how do i use gotoxy and clrscr in visual c++;
i tried this as an alternative
Code:
#include <windows.h>
int main(void)
{
HANDLE console_handle;
COORD cursor_coord;
char *buffer ="Hello World\n";
DWORD actual=0;
cursor_coord.X=(40-(strlen(buffer)/2)); //In VC++ 6.0 you have to write
x and y in caps or you'll get and error.
cursor_coord.Y=10;
console_handle= GetStdHandle( STD_OUTPUT_HANDLE);
if (SetConsoleCursorPosition(console_handle,cursor_coord)) //This would
be the equivalent to gotoxy(x,y).
WriteConsole(console_handle,buffer,strlen(buffer),&actual,NULL);// Look
up this function in your VC++ help/index
return 0;
}
but it doesnt come with windows.h either
any help would be gladly appreciated