如果用户没有在c ++

时间:2016-06-18 10:06:03

标签: c++

如果用户在c ++的特定时间间隔内没有输入,我有什么方法可以执行特定的操作?

1 个答案:

答案 0 :(得分:0)

不是严格的ISO C ++,因为基于<iostream>的功能是同步的。

除非使用某些特定于平台的API ...

这可能是How to make reading from `std::cin` timeout after a particular amount of time可以帮助。