Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 86,392 C++ Programmers. There are 1,395 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a C++ Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Threads in C++

 
Reply to this topicStart new topic

Threads in C++, good help/tutorials?

foohoo
post 8 May, 2008 - 07:43 AM
Post #1


New D.I.C Head

*
Joined: 10 Aug, 2007
Posts: 21



Hi Guys,

Just a quick question, I want to get into creating multiple threads in C++. I have done it in JAVA but I can't find any good resources for C++. After searching all I seem to find are short paragraphs or very complicated programs.

Would you know any good resources for simple examples or tutorials for using threads in C++?

Thanks in advance!


User is offlineProfile CardPM
Go to the top of the page
+Quote Post


skyHigh
post 8 May, 2008 - 09:57 AM
Post #2


New D.I.C Head

*
Joined: 1 Oct, 2007
Posts: 47

hello foohoo and everyone,

I would like to see that too since I haven't done any multithreading program before, but I would like to learn it. I searched it too, but it's just like foohoo said, only description and complicate sour code which is so hard to follow.

any tutorial would be greatful, thanks.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

skaoth
post 8 May, 2008 - 10:27 AM
Post #3


D.I.C Regular

Group Icon
Joined: 7 Nov, 2007
Posts: 273

It would be helpful to know what platform you are using.
My experience is that threading in Java is much easier than c++, the api is just very simple in Java.

Anyways here is an example of threads in windows
http://www.codersource.net/win32_multithreading.html

Here is one using pthreads. You can use this in windows and linux
http://www.cs.nmsu.edu/~jcook/Tools/pthreads/library.html
http://books.google.com/books?hl=en&id...CL4ZRRo#PPR7,M1

The last one I know about is boost
http://www.boost.org/doc/libs/1_35_0/doc/html/thread.html
http://www.ddj.com/cpp/184401518


User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Martyr2
post 8 May, 2008 - 10:35 AM
Post #4


Programming Theoretician

Group Icon
Joined: 18 Apr, 2007
Posts: 3,561

There is a sticky thread at the top of the C/C++ forum for requesting a tutorial. You might also want to drop your request there (with some content you might want to see covered) and DIC authors can write up a tutorial about it. You can reach this thread at...

Request a C++ Tutorial

In the meantime there are multiple tutorials on the web about this subject... here are a few to get you started.

1) C++ Multithreading Tutorial - paulbridger.net
2) Advanced Topics in Programming Language [VIDEO THROUGH GOOGLE] icon_up.gif
3) C++ Programming HOW-TO (small example for review)

Enjoy! I like the video, it is a bit complex but it does talk about threads in detail. smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
Time is now: 5/17/08 05:02AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month