#include <iostream.h>
#include <windows.h>
#include <winuser.h>

int main()
{
  POINT mPos;
  BOOL rc;

  while(1)
  {
    rc = GetCursorPos(&mPos);
    cout << "X:" << mPos.x << "  Y:" << mPos.y << endl;
  }
}
