首页 > 其他 > 详细

hello lua

时间:2014-11-20 01:23:24      阅读:513      评论:0      收藏:0      [点我收藏+]
 1 #include <stdio.h>
 2 #include <stdlib.h>
 3 #include <string.h>
 4 #include "lua.h"
 5 #include "lualib.h"
 6 #include "lauxlib.h"
 7 
 8 int main(int argc, char** argv)
 9 {
10     char line[1024] = {0};
11     lua_State* L = luaL_newstate();
12     luaL_openlibs(L);
13 
14     while (fgets(line, sizeof(line), stdin)!=0)
15     {
16         luaL_dostring(L, line);
17     }
18 
19     lua_close(L);
20     
21     return 0;
22 }

 

hello lua

原文:http://www.cnblogs.com/hangj/p/4109540.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!