Is there a function like Sleep(time); that pauses the program for X milliseconds, but in C++?
Which header should I add and what is the function\'s sign
Just use it...
Firstly include the unistd.h header file, #include, and use this function for pausing your program execution for desired number of seconds:
sleep(x);
x can take any value in seconds.
If you want to pause the program for 5 seconds it is like this:
sleep(5);
It is correct and I use it frequently.
It is valid for C and C++.