开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜