print text at any position without ncurses Posted on January 21st
Move your cursors to any position and print, it does the way just like how to change the color and attributes of the font illustrated at previous post.
Specified x and y position, and print a line “Hello World!”
//positioning
void gotoxy(int x, int y)
{
printf("%c[%d;%df",0x1B,y,x);
}
int main()
{
gotoxy(10,10);
printf("Hello World\n");
return 0;
}
Trackback URL

Great
U have write a good program for gotoxy.
can u tell me the about that line
printf(”%c[%d;%df”,0×1B,y,x);
Plz
i m eagerly waiting ur reply.
Thanks Dear
Commented Brain_full on March 6th, 2007.Its the way how you define ANSI codes. Refers to previous post link above to know more.
Commented mysurface on March 7th, 2007.[...] print text at any position without ncurses [...]
Commented writting a fun cli apps with ncurses on March 30th, 2007.