-
newbie Question
How can I print the text like its typed?
Its kinda hard to explain.. (because of my bad english skills)
A
AR
ARN
ARNIS
The letter 'R' will come like an 0.3 sec after the 'A' ..
one way to do it would have been:
Code:
cout<<"a";
Sleep(100);
cout<<"r";
Sleep(100);
cout<<"n";
Sleep(100);
cout<<"i";
Sleep(100);
cout<<"s";
Sleep(100);
But that sucks. any easier way to do this?
please help me
-
Code:
char *array = "arnis";
for ( int i = 0; array[i] != '\0'; i++ ) {
cout<< array[i] <<flush;
Sleep ( 100 );
}
-Prelude
-
thanks