Someone told me that code that contains "sleep()" can only run on Windows. Having a knowledge of C++ that barely goes beyond 3 weeks in a 2 semester course (The other time was spent in a program called Scratch, it was fun to use, but not practical and it angered me because it was supposed to be a C++ class.) I really cannot judge what I'm told by someone who is better than me in C++. If that is a lie, I'd say I have an easy solution to this problem. But if its not, the research that I've done has only turned up sleep() - which is really not what I'm looking for - and some complex pieces (for me at least) of code that I do not understand.
Thanks in advance
-UDBV
PS What I do know is pretty much only functions, loops (for, while, do, and if), cout and cin, and goto
These delay functions are not part of C++, but provided by the OS. If the OS supports it, you can call it from C++. You will need to use correct include file.
Yes, Sleep is windows-only. Anyways you can recreate the function for yourself. Remember that Sleep(0) does NOT wait 0 seconds, but just idles so that your CPU is more free, and that is hardly recreable.
Besides that case, this should be the non-os-depending code:
Yes, Sleep is windows-only. Anyways you can recreate the function for yourself. Remember that Sleep(0) does NOT wait 0 seconds, but just idles so that your CPU is more free, and that is hardly recreable.
Besides that case, this should be the non-os-depending code:
I am quite new to C++ so even though I'm glad that you have provided an alternative to me, I would still like to know what exactly I'm doing. I mean I've never seen this stuff before. So if you don't mind explaining it, I would appreciate it if you could. Otherwise I'll be on my way. Thanks again.