for Loop second interval

I have a question (hopefully its easy).

I have a for loop with just a dot.
I want to basically loop that for loop every 2 seconds(for example)

so it'll be like its loading or something (hopefully you guys understand me)

Thanks


1
2
for(int i = 0; i < 5; i++)
cout << '.';
1
2
3
4
5
6
7
#include<windows.h> //for Sleep()

for(int i = 0; i < 5; i++)
{
    cout << '.';
    Sleep(2000);
}
Topic archived. No new replies allowed.