[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: passing values to lua
- From: Bounty Hunter <bounty_hunter@...>
- Date: Fri, 17 Sep 2004 12:47:54 -0400
I have a c++ class
class test {
int a;
int b;
};
I use tolua++ to generate binding code and I have also this simple code:
test v;
lua_State* luaVM = lua_open();
lua_baselibopen(luaVM);
tolua_test_open(luaVM);
v.a=1;
v.b=1;
How can I pass v to lua scripts, so I can do the following:
print(v_in_lua.a)
v_in_lua.b=2
Ollen Roy, linarian bounty hunter (level 10). Never use Windows for a
Unix work.