473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Good guides for C++ threads?

42
Does anyone knows good guides about threads for C++? Preferably with example code.

I'm using win32 + DirectX for chessprogram and I need thread for computer player (so that program doesn't go unresponsive while AI ponders its next move).
May 25 '09 #1
2 1544
The windows threading mechanism is very simple.

Personally, I always favor boost.thread since it doesn't bind me to a specific OS, but since you are already using DirectX that's a moot point.

Windows threads are fairly simple. The only guide you need is MSDN. See http://msdn.microsoft.com/en-us/libr...41(VS.85).aspx

Just so you know, your project would have been much easier to finish using Ogre3D.
May 25 '09 #2
Humakt
42
@unauthorized
Thanks. I'll look into it.

Actually I may still switch to Ogre3D since it sounds promising. This was originally school project we made in small group, but since our 3D group (they had to use win32 and DirectX) failed partially, I made 2D board using OpenGL (which I had to learn overnight before final deadline). I'm using win32 practically for proper menu toolbars and I'm only starting to make 2D board (much better than 3D for chess) with DirectX.
May 25 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

24
by: matty | last post by:
Go away for a few days and you miss it all... A few opinions... Programming is a craft more than an art (software engineering, not black magic) and as such, is about writing code that works,...
7
by: tada991 | last post by:
Hello Everyone, I just purchased Visual Studio .Net Architect 2003 and want to know what's a good book for begginers to start with. I know nothing about programming whatsoever, but I do have a...
11
by: Angel Todorov | last post by:
Hello, sometimes I get a strange error from postgresql when I try to connect using ssl to the server: LOG: parse_hba: invalid syntax in pg_hba.conf file at line 46, token "hostssl" FATAL: ...
10
by: Harley | last post by:
Hello, I was VERY blessed with a Christmas gift of visual studio .net from a man I hardly know who had heard of my plans of software developement. So I am probably the only person in the world who...
1
by: Sougato Das | last post by:
Does anyone know any good places for information on sockets programming using VB.NET. I know VB.NET fairly well, but I know very little about sockets. Thanks.
4
by: GS | last post by:
Hi, I'd rather start from a good design and go from there so would be greatfull for any input. I have a simple ASP.NET application and would like to make solution elegant. I store settings in...
8
by: Matt England | last post by:
My team currently using Boost Threads, but we are considering switching to ZThreads. (We seek cross-platform, C++ multithreading capabilities in an external library.) ZThread(s): ...
6
by: WJRutledge | last post by:
Just like the subject says, I'm interested in taking up PHP and would like to know if anyone knows of any books that are a must have. I know there are tons of books out there on every language, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.