Hi everyone!
I'm trying to write a program which can run a loop without interrupt but still can accepts input from user anytime.

My program is like this:
A bunch of word will drop down(using looping)
User have to enter letters for each word but the words will still continue drop down without waiting for user input.
After finished enter letters for particular word, the word will be disappeared.

I'm newbie in C++ programming.
What conditions should I consider?
Is this called parallel programming?

Thanks!

Recommended Answers

All 2 Replies

You can use a thread to run the blocking user input functions at the same time as your other word printing so that the printing is not interrupted.

Or you can use non-blocking user input functions. I would usually use kbhit() to check if the user has pressed a key (without waiting). Note this function is not available in all compilers.

Wow, you're great!
U have saved alot of my time from searching the internet.
Thanks for replying!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.