Hi... Newbie here.

Hi everybody, I was hoping to introduce myself and get some advice.

I was assigned to create an app using Visual C++ for my CS161 class, and I'm still fairly new to the language in general. The app I've decided to create will run the user through drills designed to increase reading speed and retention (a sort of bare-bones speed reading training program, if that makes sense)

The way it will work is as follows. First the user will be prompted by the program to select a level of difficulty. Based on the number entered, the computer will display a series of randomly generated strings of letters, four characters in length. It'll look a little something like this

[Enter Level: 6

fdsa irju kklo mnpp wqas zzxl

The letters will only be visible for one second, and a prompt will ask the user to type in the letters exactly. So I need an object that will generate a series of four character 'words' and will store them long enough for someone to type them back in. I was wondering what the most efficient means would be of carrying this out. Any help you guys could give me would be awesome.
if you want to do this in a console application, have a look at:
void ClearScreen()
    cout << string( 100, '\n' );

if you want to create a gui for this, have a look at qt. it can be done by drag and drop of objects and it's not that difficult to learn.
Last edited on
The letters will only be visible for one second, ...

You're not going to be able to get away with just using standard C++ (C++03) calls if you want to limit how long a user has to type something in.

If you're using C++11, then you might be able to achieve your aim using std::thread (the i/p and o/p would be on separate threads)

With the right system or library API, you will be able to do it on one thread if you use a custom i/p routine rather than cin.

@ andywestken: i think the cout part is only visible for 1 second. how much time the user needs for his input doesnt matter.
Ah, ok.

So it's displayed for 1 sec, and then they have to type what they remember in!?

I mis-read

will store them long enough for someone to type them back in ...

as meaning they had to type it in while it was being displayed.

Last edited on
Topic archived. No new replies allowed.