[C++-sig] SOS !

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[C++-sig] SOS !

荀娜

int main()

{

 

using namespace luabind;

 

 lua_State* L = lua_open();

 luabind::open( L );

object stateTable = get_globals(L);//["stateTable"];

 

 for( object::iterator curState = stateTable.begin

();curState != stateTable.end();

  curState++ )

 {

  printf("%d\n",object_cast<int>(stateTable

[curState.key()]));

 }

...

}

 

 

my lua file:

table.lua

stateTable=

{ IDLE = 1,

  APPROACH =2,

  ATTACK = 3,

  ESCAPE = 4,

}

 

 

I am a teenager from China.

These days I was interested in luabind,especially

getting the elements from a lua table .

Why can't I realize it or make it run on the Visual

Studio?

It seems to be the problem of the conversion of types

between the languages(lua and c++).

I am not skillful at using the "object_cast".

Could you give me some advice or instruct me a little?

Thank you very much!


_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig