473,769 Members | 6,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Good guides for C++ threads?

42 New Member
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 1563
unauthorized
81 New Member
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 New Member
@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
3612
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, first and foremost. If it works well, even better. The same goes for ease of maintenance, memory footprint, speed, etc, etc. Most of the time, people are writing code for a use in the *real world*, and not just as an academic exercise. Look at...
7
5285
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 desire to learn- as obvious with this purchase. So please let me know where I can start and thanks. Also, what newsgroup should I post my queries to?
11
9449
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: Missing or erroneous pg_hba.conf file, see postmaster log for details The contents of the pg_hba.conf file are
10
2195
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 actualy has this great IDE and don't even know vb.net (or c sharp etc.). I have some prior exposure to simple scripting language such as javascript and I understand data types etc. (basic programming concepts and procedures) but I don't have any...
1
1108
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
1706
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 web.config file and I would like to have class in my application which will hold application level objects. Some methods of the class will be executed in different threads and some properties are shared among threads and static in nature. So what...
8
6213
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): http://zthread.sourceforge.net/ http://www.inf.uni-konstanz.de/dbis/members/vinnik/zsim/doc/ Can anyone share their ZThreads experience, either good, bad, or
6
2246
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 I'm sure some are much better than others. I'm mainly looking for a beginners book that also had advanced content too, but if that doesn't exist, then just an excellent beginners book would be fine too. Thanks in advance for any information you...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9414
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9848
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8860
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5432
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3947
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.