我有一段C++代码,在Windows上可以完美运行,但我想将它移植到OSX上,却遇到了很多编译错误。
在OSX上是否有等效的库?
#include <windows.h>
void gotoXY(int x, int y)
{
//Set the coordinates
COORD coord = {x, y};
//Set the position
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
return;
}