I keep getting his error...
CODE
Test2.obj : error LNK2028: unresolved token (0A0002A7) "extern "C" short __stdcall GetAsyncKeyState(int)" (?GetAsyncKeyState@@$$J14YGFH@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
Test2.obj : error LNK2019: unresolved external symbol "extern "C" short __stdcall GetAsyncKeyState(int)" (?GetAsyncKeyState@@$$J14YGFH@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
C:\Documents and Settings\Computer\Desktop\C++ Projects\test2\Debug\test2.exe : fatal error LNK1120: 2 unresolved externals
I uninstalled MSVC++ and reinstalled twice, and it is still not working. There is nothing wrong with my code.
CODE
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
while (true)
{
if (GetAsyncKeyState(VK_F12))
cout << "it worked" << endl;
}
}
Please help.