how to use ncurses on a linux based complier

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2007
Posts: 26
Reputation: web_master is an unknown quantity at this point 
Solved Threads: 0
web_master's Avatar
web_master web_master is offline Offline
Light Poster

how to use ncurses on a linux based complier

 
0
  #1
Dec 27th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: how to use ncurses on a linux based complier

 
0
  #2
Dec 27th, 2008
Don't cross-post
http://www.daniweb.com/forums/thread164409.html

Try searching "ncurses tutorial"
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 32
Reputation: Ahmed_I is an unknown quantity at this point 
Solved Threads: 1
Ahmed_I Ahmed_I is offline Offline
Light Poster

Re: how to use ncurses on a linux based complier

 
0
  #3
Dec 27th, 2008
Mr.web_master,
I've searched for a function similar to gotoxy() in ncurses .
I think i found this function:
1-
  1. mvaddch(row,col,ch);
Prints the ch in the given row and column (similar to x=row and y=column)
2-
  1. move(row,col);
move(row,col)
move the cursor to the given position

Therefore the mvaddch function can be written like this:-
  1. move(row,col);
  2. addch(ch);
.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 26
Reputation: web_master is an unknown quantity at this point 
Solved Threads: 0
web_master's Avatar
web_master web_master is offline Offline
Light Poster

Re: how to use ncurses on a linux based complier

 
0
  #4
Dec 30th, 2008
Thanks for the reply Ahmed but can u tell me which library this method is in...coz i am unable to find it....

Thanks.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC