help with the wait command

I need help with this. When I go to compile the program
it says that the wait(2000);
un declars the int main()
1
2
3
4
5
6
7
8
9
10
#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    wait(2000);
    return EXIT_SUCCESS;
}
Last edited on
What is your problem with this code? The code don't compile?
I'm not sure there is such a function as wait in <cstdlib>.
I do believe that the wait function is a windows thing. As stated above...
Also are you getting this from a book or somthing, because that code doesn't do anything.
so do I need to include <windows.h>?
No... dude, thats the same as your other thread. The suggestion was to implement a wait function yourself with the functions ctime offers. basically, you'd just have to run an infinite loop that waits til 2 seconds have passed.
I did not know that!
Topic archived. No new replies allowed.