C++ Articles, Information, and Tutorials

Even though I've used a lot of languages during my career, C++ is still my favorite. It's sheer power and expressiveness, especially through templates and generic programming, is mind-blowing at times. Someone once wrote (I can't recall where), that in C++ it's possible to write a block of code and say to yourself, "That's the cleverest five lines of code I've ever written."

Accelerated C++ Solutions

The book Accelerated C++ by Andrew Koenig and Barbara E. Moo is an excellent C++ tutorial, but several people to whom I've recommended the book have wanted solutions to the exercises. Here they are.

C++ Win32 Library

This portion of the site is about a C++ application library I wrote for Win32 a few years ago. I recently picked it up and dusted it off again, so I decided to document its development here for those readers that might be interested in Windows development with C++ that doesn't rely on MFC.

Error Handling

I'm rolling back through my Win32 Library line by line now looking for places where I should be concerned about error handling, thread safety, and security issues. Naturally, this should all have been in place already were this a professional-quality library. Since the more I work on this library, the more complete it becomes, I thought it would also be a good idea to practice dealing with these issues while I'm under the hood... before they come back to bite me.

Threading

This article shows an approach to threading based on the concept of Resource Acquisition is Initialization.

Message Cracking

This article describes the message-cracking template class I use in WindowLib. It explains the template-based approach I took to message handling in WindowLib, as opposed to the typical macro-based approach in MFC and the windowsx.h header.

Resource Management

Here's another application of the Resource Acquisition is Initialization idiom that is useful in preventing resource leaks in your C++ applications. It's so simple to use that your applications may never leak handles again!

Mancala

I recently wrote a Mancala game using my C++ Library. The source code to the game is available for those that are interested, but everyone else should just enjoy the game.