| | |
how to use ncurses on a linux based complier
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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
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
•
•
Join Date: Nov 2008
Posts: 32
Reputation:
Solved Threads: 1
Mr.web_master,
I've searched for a function similar to gotoxy() in ncurses .
I think i found this function:
1- Prints the ch in the given row and column (similar to x=row and y=column)
2- move(row,col)
move the cursor to the given position
Therefore the mvaddch function can be written like this:-
.
I've searched for a function similar to gotoxy() in ncurses .
I think i found this function:
1-
C++ Syntax (Toggle Plain Text)
mvaddch(row,col,ch);
2-
C++ Syntax (Toggle Plain Text)
move(row,col);
move the cursor to the given position
Therefore the mvaddch function can be written like this:-
C++ Syntax (Toggle Plain Text)
move(row,col); addch(ch);
![]() |
Other Threads in the C++ Forum
- Previous Thread: Template Methods help
- Next Thread: dllexport for all functions
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






