c++ 通过宏生成静态的变量

#include 
#include "nnvm/c_api.h"
using namespace std;

class Base {
    virtual void f(){};
};
class Derived: public Base {};


Derived& __REGISTER__(const std::string& name){

    Derived * e =new Derived();
    cout<<"function __REGISTER__ OpName:"<

输出:
function __REGISTER__ OpName:hello
7Derived

你可能感兴趣的:(c-c++)