简体   繁体   中英

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

我们刚刚在我的C ++类中进行了屏幕控制,我想创建一个控制台应用程序,你可以使用w,a,s,d在屏幕上移动“X”,但我不希望用户拥有进入。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM