我在使用 curses.h 头文件时遇到了一点问题,是的,我对 C++ 编码还是有点陌生。问题是当我尝试编译时,它给出了错误:
C:\Users\james\AppData\Local\Temp\cc0VxbfM.o:main.cpp:(.text+0x82): undefined reference to `PDC_chadd'
这是代码:
#include <conio.h>
#include <curses.h>
int main()
{
initscr();
int nPlayerX = 40, nPlayerY = 12;
while(true)
{
move(nPlayerY, nPlayerX); //Moves the console cursor on the Y and X axis
addch('Y'); //Add a character
}
}