954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to use ncurses on a linux based complier

hey,

I am developing this game of snake, just like the nokia phones have. anyway i have worked on windows till now, but now i am using geany on linux. so there are quite some methods which are not standardised for all platforms. one of them is gotoxy() and i have found that there is ncurses() instead on linux. but i dont know the syntax. if anyone out there knows please help me, or if there is some other method to mess with the coordinates of the screen.

Thanks

web_master
Light Poster
28 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

Don't cross-post
http://www.daniweb.com/forums/thread164409.html

Try searching "ncurses tutorial"

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

Mr.web_master,
I've searched for a function similar to gotoxy() in ncurses .
I think i found this function:
1-

mvaddch(row,col,ch);

Prints the ch in the given row and column (similar to x=row and y=column)
2-

move(row,col);


move(row,col)
move the cursor to the given position

Therefore the mvaddch function can be written like this:-

move(row,col);
addch(ch);


.

Ahmed_I
Light Poster
32 posts since Nov 2008
Reputation Points: 14
Solved Threads: 1
 

Thanks for the reply Ahmed but can u tell me which library this method is in...coz i am unable to find it....

Thanks.

web_master
Light Poster
28 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You