开发者

Working with C/C++ preprocessor macros in Visual Studio IDE

开发者 https://www.devze.com 2023-03-21 00:06 出处:网络
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:

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

精彩评论

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

关注公众号