Getting user input without pausing

Is there a simple way to allow user input without having the program "wait" for it?

For example, I want to write a function that counts down from 100 to 0. The only way to stop it would be if the user enters a certain phrase. I want to make sure that the count down is absolutely uninterrupted unless the exact phrase is entered.

So, how would I have a variable ready to be changed by the user, and also a function running at "the same time" so to speak?

It doesn't need threads. It just needs nonblocking input functions. Unfortunately there is no such thing in standard C++, but they certainly exist in other libraries. For example, Borland C++ used to have a function called kbhit() once upon a time, which would return true if there was data waiting to be read from the console and false otherwise.

Dev-C++ may have an implementation of kbhit() (it has getche() ...), and if not the web describes a number of ways of doing it. Here's one reference for using kbhit() without ncurses on Linux: Non-blocking user input in loop without ncurses. – c/c++ programming by examples
If you want to do this sort of thing seriously though you could look into ncurses (or pdcurses, which I hear is roughly equivalent but runs on Windows). Be warned that it might be quite a bit of work to learn a new API like ncurses, however.

The short answer is that it's not easy, and if you're just trying to write a program that displays "the nuke will go off in X seconds!" unless you type the password, just for fun . . . it's probably not worth the hassle.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell