problem using gotoxy() in code::blocks ide, gnu c++ compiler

hi guys..
i have got a problem.
I am using code::block IDE (on ubuntu) and gnu C++ compiler. It does not recognise "windows.h". I need to use gotoxy() which is quite vital for project i am working on. Can any one suggest me a similar function(which uses some standerd lib) or any other solution of this problem
-regards
Have a look at the ncurses library:

http://www.gnu.org/s/ncurses/
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

Sample program:

1
2
3
4
5
6
7
8
9
10
11
12
#include <ncurses.h>

int main()
{	
	initscr();
	mvprintw(10, 30, "Hello World!"); /* mvprintw(y, x, ...) */
	refresh();
	getch();
	endwin();

	return 0;
}


In code::blocks, remember to link -lncurses.
thank u vry much. I exactly got your point.
but explain me how to link this library to code::blocks. i am using latest version of it.
In code::blocks, I think you add -lncurses to Project Build Options -> Linker Settings -> Other Linker Options.
Rather, you add "ncurses" to "link libraries".
Topic archived. No new replies allowed.