sorry not the right code here
Code:
#include <iostream>
#include <stdlib.h>
#include <windows.h>
int click(int x, int y)
{
mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
Sleep(rand(20)%15);
mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
cout << x << "," << y << endl; // x = 100 and y = 100 like it is suposted to
return 0;
}
int main()
{
int x, y;
click(110, 100);
cout << x << "," << y << endl; // x = 37879712 and y = 575 ????????????????????
cin.ignore();
}
Why is x and y returning that value when nothing else was changed?