Threading in C++

  • Thread starter Ambreen Ashfaq Afridi
  • Start date
A

Ambreen Ashfaq Afridi

hi all
im new to threading in C++. Can any of you plz post a very simple and
well explained example of threading in c++, and also which files and
namespaces to include.
thanks a lot
 
F

Fred Zwarts

Ambreen Ashfaq Afridi said:
hi all
im new to threading in C++. Can any of you plz post a very simple and
well explained example of threading in c++, and also which files and
namespaces to include.
thanks a lot

Threading is not defined in C++.
The threading models of e.g. Linux and Windows are a bit different,
so you need a platform specific solution or use a library has a
uniform interface for different platforms. Such a solution may
not be portable to all platforms with a standard C++ compiler.
 
P

peter koch

hi all
im new to threading in C++. Can any of you plz post a very simple and
well explained example of threading in c++, and also which files and
namespaces to include.
thanks a lot

Take a look at boost. As Fred Zwarts told you, threading is not part
of the current C++ standard. But the next standard will include
threading, and boost should be a close approximation to what is going
to be in the next standard.

/Peter
 
A

abhijith.net

Threading is not defined in C++.
The threading models of e.g. Linux and Windows are a bit different,
so you need a platform specific solution or use a library has a
uniform interface for different platforms. Such a solution may
not be portable to all platforms with a standard C++ compiler.
In addition to above, Thereadign is gettign standardized, so will be
there soon in C++
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top