无法从'int'转换为'int*'

fla*_*006 2 c++ curses ncurses pdcurses

所以我有这些代码行:

int maxY, maxX;
getmaxyx(stdscr, &maxY, &maxX);
Run Code Online (Sandbox Code Playgroud)

它给了我以下错误:

error C2440: '=' : cannot convert from 'int' to 'int *'
        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Run Code Online (Sandbox Code Playgroud)

每次我使用它两次.我甚至没有使用=运算符!包含curses.h文件.我究竟做错了什么?

not*_*row 5

getmaxyx是一个宏,它不采用int*,而是int.
它解决了类似的问题

getmaxyx(S,Y,X) -> X=s->X, Y=s->Y
Run Code Online (Sandbox Code Playgroud)

尝试

getmaxyx(stdscr, maxY, maxX); // without the & operator
Run Code Online (Sandbox Code Playgroud)

http://opengroup.org/onlinepubs/007908775/xcurses/getmaxyx.html