You might want to try the Sleep() command, which I believe is in the windows.h or conio.c header file :
Code:
#include <iostream.h>
#include <conio.c>
#include <windows.h>
int main()
{
int x = 1;
do{
gotoxy(x,1);
cout << "*" ;
x ++;
Sleep(50); // This is the only line I touched...
gotoxy(x - 1,1);
cout << " " ;
gotoxy(x,1);
cout << "*" ;
if( x == 81 ) {
x = 1;
}
} while ( x != 0 );
system("PAUSE");
return (0);
}
Sleep() according to MSDN : The Sleep function suspends the execution of the current thread for at least the specified interval.
Sleep(int x) where x is the number of milliseconds to pause the program.
Hope this helps,
Korhedron