Alternative to c++ static virtual methods

前端 未结 12 2153
深忆病人
深忆病人 2020-12-04 21:58

In C++ is not possible to declare a static virtual function, neither cast a non-static function to a C style function pointer.

Now, I have a plain ol\' C SDK that us

12条回答
  •  春和景丽
    2020-12-04 22:11

    If the C SDK wants you to perform operations without providing a userdata, then object-orientation is likely unnecessary and you should just write some functions. Else, time to find a new SDK.

提交回复
热议问题