【发布时间】:2011-10-22 10:27:33
【问题描述】:
所以我有这样的代码:
// puma.cpp
#include "FILE_WITH_MACROS.hpp"
ANIMAL_MACROS_NAME_HERE class puma : public animal {
public:
puma(int age) : animal(age) {}
virtual std::string get_name() {
return "puma";
}
};
//end of puma.cpp and here we want to add some more code via ANIMAL_MACROS_NAME_HERE macros.
我在 C++ 文件中间使用的宏可以在文件末尾添加一些代码吗?
【问题讨论】:
-
您希望宏最后添加什么?也许还有另一种方法可以实现您想要的……
标签: c++ macros cross-platform c-preprocessor