我写了
#ifndef Header1.h
#define Header1.h
class Complex
{
[...]
};
#endif
在我的项目 (Visual Studio 2010) 中出现错误 C2008:“.” : 在宏定义中意外。我不明白“Header1.h”有什么问题或如何解决它。
最佳答案
不要使用 .使用 _ 代替
#ifndef HEADER1_H
#define HEADER1_H
class Complex
{
[...]
};
#endif
关于c++ - "unexpected in macro definition",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19797740/