Some Handy Visual C++ Pre-Processor Macros

Over the last few years, I’ve been writing a lot of C++ that I’ve targeted for multiple platforms and/or multiple compilers. It has always been somewhat of a delicate  task to make C++ code portable, especially when starting with Visual Studio and targeting other platforms like Linux using GCC. Along with multi-target compilations, C++ pre-processor macros can be a useful tool in reducing the amount of mundane, rather simple, and rudimentary code that many C++ programmers find themselves writing. Here’s a few macros that I’ve used to ease my own development pain, I hope someone else can find them as handy as I have. Read more

Yeah my download links are all busted…

Alright, after installing an SEO plugin for my WordPress site, I discovered that quite a few people have been trying to download files that no longer exist. Apparently an old plugin that acted as my downloads manager left some links laying around in several pages. I’m getting quite a few 404′s reported, so I thought I’d just take a moment to tell everybody that I’m working on that :) I’ll have new download links available soon (probably tonight). So try checking again, please.

Sorry for any inconvenience.

VS2008 Solution Compile Error C2471 Hotfix

Incase anybody else out there is encountering the annoying Visual Studio 2008 bug where compiling a solution results in Error C2471 (can’t update debug database)… here’s the fix: http://code.msdn.microsoft.com/KB946040

For the longest time I chalked it up to my anti-virus software obtaining a lock on the file and not letting go of it. As it turns out, its a bug in VS2008.

Factory Pattern in C++

Up until now I never really used the factory pattern that often in C++. Recently I found a use for it in a project I was working on and since I found it useful for my purposes, I thought I might share a tutorial on how the factory pattern can be used in C++.

Now I’m not entirely sure how closely my model fits to the typical factory pattern but as far as I understand factory pattern, it is pretty close if not exact.

Basically a factory consists of an interface class which is common to all of the implementation classes that the factory will create. Then you have the factory class which is usually a singleton class that spawns instances of these implementation classes.

Read more

Its been a while

Other than the title of a crappy Staind song… it has been a while indeed. My WP install has been pretty horked for the last few months so I haven’t bothered updating. I’ll take this opportunity (now that I’ve reinstalled WP completely and restored from backup) to fill anybody reading in on what I’ve been doing over the last ~6 months.

To sum it up… I have been working my rocks off. Incase you haven’t read my LinkedIn profile, I’m working as a serious game software developer at a research company that primarily focuses on US Army dismounted infantry simulators. We have a demo coming up in September so we’re all pretty strapped for time while trying to make this demo as clean and bug-free as possible.

Read more