Is it possible to create such C++ macros that would wrap your standard (inherited) class into an application?

前端 未结 2 693
猫巷女王i
猫巷女王i 2021-01-22 09:06

So we have simple interface base class:

class animal {
public:
  animal(int age) : age_(age) {
  }
  virtual ~animal(void) {
  }
  virtual std::string get_name(v         


        
2条回答
  •  半阙折子戏
    2021-01-22 09:36

    I'd just make it so that the main() is trivial. Like

    int main()
    {
        int default_age = 4;
        return puma(default_age).run();
    }
    

    and leave it at that.

提交回复
热议问题