C++按键响应

#include #include using namespace std; #define ESC 0x1b // scan code for ESC character int main() { float f1 = 0.1f; float f2 = 0.1f; float f3 = 0.1f; int keypress = 0; do { cout<<"按键:"<=1000) { f1 =-1000; } if (f2>=1000) { f2=-1000; } if (f3 >=1000) { f3 = -1000; } } while (!kbhit());//当按下一个键时退出循环 cout<<'/n'; }while(keypress!=ESC ); }

你可能感兴趣的:(c++,学习研究,c++,include,float)