ok i am trying to make a simple game on the console application so i made something as simple as if i press 'A' on my keyboard it tells me that i pressed
the letter 'A' here is my code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
usingnamespace std;
int main(){
char input;
cin>>input;
if (input=='a'){
cout<< "you pressed 'a' on the keyboard! XD" <<endl;
cin.get();
}
else {
cout<< "you did not press a" <<endl;
cin.get();
}
cin.get();
}
ok but in order to make it work i still have to press Enter after i press 'A'
how do i cancel the Enter button (so i can just press 'A' instead >.>? is
there a way?
ok 1 more question these dlls that im gonna use to get keyboard input corectly
were made with C++ so just for the sake of knowing it (so maybe i could make my own dlls)