如何获取鼠标点击时相对 控制台时的坐标
全部就这些悬赏了
大神看看吧
2条回答 默认 最新
- 匿名用户__ 2021-03-05 22:35关注
#include <windows.h> //所需头文件 #include <iostream> POINT p; int main() { //----------循环检测---------- while(1) { GetCursorPos(&p); //获取鼠标在屏幕上的位置 printf("(%d,%d)\n",p.x,p.y); Sleep(20); //等待20毫秒,减少CPU占用 } return 0; }
解决 3无用