C++ NCurses how to get current cursor position?

13,180

Solution 1

You might have forgotten some #include <ncurses.h> and the macro is spelled getyx

Don't forget to compile with g++ -Wall -g and to link with -lncurses

Solution 2

getyx(WINDOW *win,int y,int x);

not getxy().

Share:
13,180

Related videos on Youtube

Predictability
Author by

Predictability

Updated on June 09, 2022

Comments

  • Predictability
    Predictability about 2 years

    How do I get the current position of the cursor in terminal with NCurses using C++? I searched around a bit and saw "getxy(int x, int y)". I tried that and got the error "'getxy' was not declared in this scope".