Slowly showing words on the screen

I was wondering how to slowly show words on the screen, like in video games when there is text on the screen and the words pop up one by one like this:

http://youtu.be/jWNEZ2yhtqw?t=15s

my guess is by using the for loop but honestly i dont even have a clue where to go or start from there.
split your sentence in seperate letters,
put it in an array
loop:
cout each letter
use sleep()
and go to loop
1
2
3
4
5
6
7
8
9
10
11
12
make sure you include windows.h

for(int i = 0;i < NUM_WORDS;i++)
{
    std::cout << WRD[i] << " ";
    delay(500);
}

inline void delay( unsigned long ms )
{
    Sleep( ms );
}
Last edited on
Topic archived. No new replies allowed.