Working with C/C++ preprocessor macros in Visual Studio IDE
There can be开发者_运维知识库 a macro definition somewhere in my project:
#define A 1
In another place of my project, there are such piece of code:
#ifdef A
do_something()
#endif
When I move mouse pointer to "ifdef" Visual Studio 2010 IDE shows "#define A 2".
That is fine, but how can I understand, in which file VS seeing this macro definition?
It is being pulled from a data structure inside MSVC
As you type and create data types and macros and function, MSVC adds that information to an internal symbol table. When you hover over an identifier, it does a lookup on it and then can display the information as you see it.
精彩评论