#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
POINT po;
while(1){
Sleep(100);
if(GetKeyState(0x01)<0){
GetCursorPos(&po);
cout << "(x,y) = " << "(" << po.x << "," << po.y << ")" << endl;
}
}
system("PAUSE");
return EXIT_SUCCESS;
}