开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜