天天看點

宏定義

1.想讓你的代碼别人讀不懂 (使用宏定義)

2.想讓你的代碼簡潔大方(使用宏定義)

尤其是10幾個類 使用同幾個函數的名稱的時候(可見mfc架構使用了大量的宏定義)

#define HONG_FUNCTION(Key, Name) \

    std::string get_mod_key() override { return Key; } \

    std::wstring get_mod_name() override { return Name; }

#endif