开发者

Using C++, while making a console application is there a way for cin to accept the next character entered and continue without hitting enter?

开发者 https://www.devze.com 2023-02-23 07:52 出处:网络
We just covered screen control in my C++ class and I want to make a console app where you can move a \"X\" around the screen with the use 开发者_开发技巧of w,a,s,d, but I don\'t want the user to have

We just covered screen control in my C++ class and I want to make a console app where you can move a "X" around the screen with the use 开发者_开发技巧of w,a,s,d, but I don't want the user to have to hit enter.


This is not possible with standard C++. You will need a cross-platform library like pdcurses or the conio library (originally from DOS), or a related platform-dependent library.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号