Skip to content

Instantly share code, notes, and snippets.

@binh12A3
Created July 31, 2021 09:02
Show Gist options
  • Save binh12A3/0eaf66d636578eefe1d361f30d2ee38f to your computer and use it in GitHub Desktop.
Save binh12A3/0eaf66d636578eefe1d361f30d2ee38f to your computer and use it in GitHub Desktop.
#include <iostream>
#include <Windows.h>
using namespace std;
void Function1() {
cout << "This is function 1" << endl;
}
void Function2(const char* str) {
cout << str << endl;
}
int main()
{
while (true)
{
if (GetAsyncKeyState(VK_NUMPAD1) & 1) {
Function1();
Function2("This is function 2 !!!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment