2013年9月24日

C++与lua之间的双向表交互

摘要: C++创建表结构代码: 1 std::map mapInfo; 2 lua_newtable(pLua); 3 for(std::map::iterator pos=mapInfo.begin(); pos!=mapInfo.end(); ++pos) 4 { 5 std::string keyUTF8 = TString::fromUtf16(pos->first).ToUtf8(); 6 std::string valueUTF8 = TString::fromUtf16(pos->second).ToUtf8(); 7 lua_pushstring(pLua, k... 阅读全文

posted @ 2013-09-24 11:31 夜曲2005 阅读(430) 评论(0) 推荐(0) 编辑

导航