Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cursor positioning command?

Status
Not open for further replies.

hughLg

Programmer
Feb 18, 2002
136
MY
In other programming language like pascal, i can use the procedure "gotoxy" to direct the cursor or insertion point to specific position on the screen.

how can i do same task in C?
 
#include <curses.h>

main()
{
initscr();
move(10, 15);
addch('X');
refresh();
endwin();
}

to compile
cc ...... -lcurses

also read curses cocumentation

man curses
 
hi denniscpp

it is as simple as this
hope this solves ur problem
#include <dos.h>
#include <stdio.h>
#include<conio.h>

void main()
{
gotoxy(5,5);
printf(&quot;denniscpp&quot;);
}

 
There is no portable way of doing that - depends on the OS/Compiler.

Shyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top