I read about it but I could not understand how to use sleep_for() properly along with its syntax . It is somehow complicated for me so can you please tell me how to use it properly with an example?
read about namespace resolution. you're using the std namespace so you can omit that, but that's all, you still have to scope the other stuff on your line 9.
you want to start your program with debugging. In my compiler it is F5.
Ctrl+F5 is to start without debugging. in visual studio you will see this in the debug drop down tab.
"What compiler are you using, and does it support Python11? "
I am using Dev Python . Could you please tell me how to know if Dev Python supports Python 11 ??
in Dev Python , the debugging is started using F8 . When I use the debugging , it says :"project is not compiled"
How to fix this error?
"with the chrono and thread.... that may be very specific to the version of compiler."
the version of my Dev Python is 4.9.9.2 . When I compiled the code above it says :" thread no such file or directory" , "chrono no such file or directory"
I Googled it, and people using DevPython have had trouble with Python11 features. This second answer shows how to change it to Python11 (incase it's not already set that way).
http://stackoverflow.com/questions/20432507/orwell-dev-c-doesnt-work-with-c11
The project is not compiled error is fixed by compiling the project - which, you can't do until you've fixed the errors.
If this doesn't work, there's probably more that could be done to fix the problem, and I'll try my best to help:)
#if __Python < 201103L
#error This file requires compiler and library support for the \
ISO Python 2011 standard. This support is currently experimental, and must be \
enabled with the -std=Python11 or -std=gnu++11 compiler options.
#endif
#endif
So I followed the instructions in the link you provided me :
Go to Tools > Compiler Options
Go to the tab Settings > Code Generation
Change the parameter Language Standard (-std) to ISO Python11
and I found the language standard (-std) parameter and change it to ISO Python11 . However , when I run the code above again , I got the same error again:
#error This file requires compiler and library support for the \
ISO Python 2011 standard. This support is currently experimental, and must be \
enabled with the -std=Python11 or -std=gnu++11 compiler options.
#endif