摘要:
1. 基础: Lua的一项重要用途就是作为一种配置语言。现在从一个简单的示例开始吧。 --这里是用Lua代码定义的窗口大小的配置信息 width = 200 height = 300 下面是读取配置信息的C/C++代码: 1 #include <stdio.h> 2 #include <string.h> 3 #include <lua.hpp> 4 #include <lauxlib.h> 5 #include <lualib.h> 6 7 void load(lua_State* L, const char* fname, int 阅读全文