so I want to make a program that plays a random sound when a certain key is hit but I am not sure how to run it in the background so it doesn't have to be in the application itself just as long as its running and I guess hide it as well
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
#include <windows.h>
usingnamespace std;
int main(){
string mystring;
cin>>mystring;
if (GetKeyState(VK_SHIFT)){
//play a sound
}
system("pause");
return 0;
}
is just a simple way to think of it but still need to do all of what I stated above