7

在阅读代码时,我遇到了一个有 2 个标识符“命名它”的类:

class A_EXP Node
{
//..
};

我无法理解这意味着什么。有人可以帮我吗?

4

1 回答 1

12

A_EXP is probably a macro, possibly expanding to nothing at all. It may also expand to a __declspec or similar declaration, which modifies how the compiler will emit the class as object code. A common use of this pattern would be:

#define A_EXP __declspec(dllexport)
于 2012-07-23T16:45:03.930 回答