why does the getch() run first no matter what? How can i make the getch run after i say like "enter a key"
Code:#include <conio.h> #include <iostream.h> int get; int keypress(){ get = getch(); return get; } void main(){ cout<<"Press a key\n"; keypress(); cout<<get<<"\n"; }




Reply With Quote