Detecting if code is compiling under Visual Studio

I wanted to figure out how to tell if my code was compiling in Visual Studio or somewhere else (GCC probably), and I found that you can use #ifdef _MSC_VER.

Leave a Reply