|
|
|
|
sleep(2000);
.
Compyx wrote: |
---|
Since the standard library uses buffered I/O, you need to flush the output buffer (holding "Hello") before sleeping. In C I would usefflush(stdout); , in C++ I believe cout.flush(); should do the trick. A newline will also flush the output buffer, but that would break up "Hello World" over two lines. |