N
N
Nikitos_STR2015-02-21 21:41:56
C++ / C#
Nikitos_STR, 2015-02-21 21:41:56

How to make a time limit on character input in C++?

The question arose: how to give the user the nth amount of time to enter, after which the input request stops and the code continues to be executed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2015-02-21
@Nikitos_STR

There is a not quite standard facility available in visual studio - _kbhit()
See this question

M
MiiNiPaa, 2015-02-21
@MiiNiPaa

It is impossible to do this with standard C++ tools. Read MSDN about manual input processing from the console.
https://msdn.microsoft.com/en-us/library/windows/d...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question