Hi everybody, my problem is fixed, but as you can see, the sleep function is there with no executor. Can anybody here tell me how to activate/execute the sleep function? (Forgive me, I am using very simple terminology because I am a beginner, and I am not yet used to all of the correct phrases used in C++ programing.)
I don't know what you mean by "no executor". You're certainly calling the sleep function several times in the code you've posted. What makes you think you aren't?
Is your code compiling? If not, then you need to #include the correct header file.
If it is compiling, then you can assume a function declaration is in there somewhere. It must have been in one of the files that's included by <iostream> or <string>. It would be good practice to explicitly include the correct header file for sleep as well, but it's not strictly necessary if something is else is already including it for you.
or 'int()' function/piece of code to activate the sleep function.
I don't know what you mean by this. You already are calling the sleep function. It's right there in your code.
How do I get the sleep function to work?
What makes you think it isn't working? What results are you seeing that make you think that? You've not been clear about what problem you're seeing.
So, you mean it's not compiling? It would help if you explained your problems more clearly. It always helps to post the actual text of the errors you're getting, too.
What platform are you on? I think on Linux, it's in <unistd.h>, but I could be misremembering. I also think it sleeps for the specified number of seconds - do you really want to be sleeping for 1000 seconds?
If you're on Windows, the function is Sleep, and it the argument is in milliseconds. According to MSDN, it's in different header files for different Windows versions, so you'll have to have a look at the documentation yourself to see which one is right for your version of Windows.
Sorry! I am using an online compiler, that I think is based upon Windows. In this case, 1000 refers to 10 seconds, does it not. In the case that it is based on Linux, that's where I am a beginner, as I have no experience with Linux whatsoever. You could say that I am a 'Die Hard Windows Fan', but that's besides the point.
I'm sorry, I am a beginner, but does anybody here understand what I mean?