How to run more than one function at the same time?

I am a beginner in C++ and I barely make simple console applications and now I could make a music for an application by the Beep(int,int) and I might need to make a timer for some apps by Sleep(int) but then I want the program to run the app, the music, and the timer, at the same time. so how to do that??
I heard about some header files that I might need like
1
2
3
4
#include <ctime>
#include <future>
#include <thread>
#include <boost/thread.hpp> 

but non of those header files worked on my compilers.
or maybe I'm doing something wrong! I don't know! anyway,
I'm using 3 compilers
Dev-C++
Microsoft Visual Studio 2010
CodeBlocks

so the question is...
cout<<"How to run 2||3 functions at the same time. (in simple console applications)";
I'm using 3 compilers
Dev-C++
Microsoft Visual Studio 2010
CodeBlocks

No. Those are integrated development environments (IDEs). Each IDE uses some compiler and usually allows you to select the compiler.

The MSVS uses Microsoft's compiler (tight integration). Much more recent MSVS is available.

Both Dev-C++ and Code::Block usually use GCC, and you can update the GCC separately. (Which Dev-C++? The original that was old a decade ago, or a more recent fork?)

The GCC's default is C++98 with some extensions, but you can change the mode to C++14 with command-line parameter. As a user of IDE it is your duty to know how to set the IDE to call the compiler with appropriate parameters.


The Boost is a third-party collection. Some pieces of Boost have been adopted into C++ standard, but not as 100% copy, so you should not mix similar features from Boost and standard.
mm, that explained a lot.
I am not sure what kind of Dav-C++ I am using, but it really sounds like something from stone age.
I set the compiler option in Code::Block on the "GNU GCC compiler".
so I should update the GCC.
Ok
cout<<"\nThank you very much sir \x01";
Topic archived. No new replies allowed.