Problem: I highlighted syntax highlighting and IntelliSense. I have a C ++ source file:
#include "stdafx.hpp" #ifdef SOMETHING do_some_stuff; #endif
where stdafx.hpp (the precompiled header for the project) contains the .h file, which reads:
#ifdef DEFINE_SOMETHING #define SOMETHING #endif
and DEFINE_SOMETHING defined in the project properties for the project (in C ++ / Preprocessor).
Visual Studio plays the track and displays do_some_stuff; (actually a lot of lines of code) in plain gray - I have neither syntax coloring nor IntelliSense.
Question:. How can I get Visual Studio to get this right (unlikely) or disable the fact that its gray code, which it considers, is #ifdef 'd out?
(Code reordering is not an option - it is a large and complex system whose files are created in different environments, Visual Studio is only one of them. I am using Visual Studio 2005, but I would be interested to know if this is fixed or workaround in a later version .)
source share