随笔 - 483, 文章 - 0, 评论 - 2, 阅读 - 18万

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

随笔分类 -  Lua

摘要:function n_serialize(data) if type(data)=="number" then io.write(data,"\n") elseif type(data)=="string" then io.write(string.format("%q\n",data)) el... 阅读全文

posted @ 2015-08-05 10:36 ggzone 阅读(271) 评论(0) 推荐(0) 编辑

摘要:C++代码:// LuaAndC.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std; extern "C" { #include "lua.h" #includ... 阅读全文

posted @ 2015-08-04 13:37 ggzone 阅读(190) 评论(0) 推荐(0) 编辑

摘要:C++代码:// LuaAndC.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std; extern "C" { #include "lua.h" #inc... 阅读全文

posted @ 2015-08-04 11:37 ggzone 阅读(1083) 评论(0) 推荐(0) 编辑

摘要:C++代码:// LuaAndC.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std; extern "C" { #include "lua.h" #inc... 阅读全文

posted @ 2015-08-04 10:33 ggzone 阅读(1971) 评论(0) 推荐(0) 编辑

摘要:编译静态库:1.新建Win32控制台应用程序Lua5.3,下一步,应用程序类型选择:DLL,空项目,完成。2.项目名右键属性,配置属性--项目默认值--配置类型:静态库(.lib)3.头文件上右键添加现有项,添加所有.h文件4.源文件上右键添加现有项,添加所有.c文件(除lua.c和luac.c)5... 阅读全文

posted @ 2015-08-03 16:41 ggzone 阅读(206) 评论(0) 推荐(0) 编辑

摘要:--Table当Map使用var={name="a",sex=1,age=18}for key,var in pairs(var) do print(key,var)end--Table当数组使用arr={1,1,2,3,"hello"}table.insert(arr,1,"wo... 阅读全文

posted @ 2015-07-31 14:48 ggzone 阅读(264) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示