www.flickr.com

gotoxy function in Visual C++ and Non-Turbo C Compilers

Monday, October 31, 2011 Posted by Glenn Von Posadas

Here is my function:

Gotoxy function is really essential in designing your programs. So use it well!



void gotoxy(int x, int y) //for gotoxy--> gotoxy(x,y)
{
HANDLE hConsoleOutput;
COORD dwCursorPosition;
cout.flush();
dwCursorPosition.X = x;
dwCursorPosition.Y = y;
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hConsoleOutput,dwCursorPosition);
}

glenn von

Author: Glenn Posadas

20 year old 5th year Computer Engineering Student, a blogger, photographer, programmer, and an electronics hobbyist; a Christian who loves God very much..

Sharing is so Easy:
StumpleUpon DiggIt! Del.icio.us Blinklist Yahoo Furl Technorati Simpy Spurl Reddit Google Twitter FaceBook

Labels: ,
  1. hahaha.. this is my favorite function in C programming :)

  2. hola sir aj, :))). Dev-c++ compiler and visual-c++ have no gotoxy function, unless you use the codes above. hehehehe.

  3. Anonymous

Post a Comment

Drop a comment. Thank you guys!