How do I get terminal cursor position?

How do I get the position of the cursor in Terminal and save it to variables called X and Y (X being the row, Y being the column), preferably using NCurses. I've searched around a bit, and found getxy(int x, int y), but it won't compile with ncurses (Getting the error "error: ‘getxy’ was not declared in this scope"). Can someone help me? I'm using Linux, so I won't be able to use any windows libraries.

EDIT: Sorry, it's spelled "getyx", and I just misspelled it.
Last edited on
Topic archived. No new replies allowed.