Monthly archive - October 2011

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