Text colour and Sleep

How to make the system sleep for sometime (like seconds)?
Also, how to change the text colour in c++?
I saw a program written a long time ago and it uses dos.h but it isn't usable in windows.
I am using codelite for writing c++ programs.
You should almost always prefer the standard APIs over platform APIs if possible. You can put the current thread to sleep using
std::this_thread::sleep_for().
http://www.cplusplus.com/reference/thread/this_thread/sleep_for/
Topic archived. No new replies allowed.