... nullptr }; luaL_register(lua, 0, personFunctions); } lua_setmetatable(lua, -2); } 上面的代码来自对此question的答案。它将一个C++类(人员)绑定(bind)到Lua。
確定! 回上一頁