how do i use gotoxy and clrscr in visual c++;
i tried this as an alternativebut it doesnt come with windows.h eitherCode:#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; }
any help would be gladly appreciated



LinkBack URL
About LinkBacks



