In Turbo C++:
while(i<10)
{delay(100);
cout<<"*";
i++;}
will print "*" after a regular intervals of 100 milliseconds. If I try to do the same in C++ in UNIX like:
while(i<10)
{
sleep(1);
cout<<"*";
i++;}
it prints "*" 10 times after a single interval of 10 seconds at once.
Please, can someone explain why is it not working.