I am looking for a way to transfer the variable addresses back and forth between C++ and Lua. For instance, transferring an object from C++ to Lua and do some processing, th
See the article at the Lua user's wiki about binding code to Lua. There are several techniques for making a C++ object useful from the Lua side of the fence that range in complexity from just letting Lua hold an opaque pointer that it can't directly use, to a full wrapping exposing all C++ methods and potentially even allowing the object to be extended with methods written in Lua.
For simple functional libraries written in C, it is fairly easy to write your own binding by hand using the Lua API to move between the Lua stack and your library's functions.
For an object based system, it is a lot more work to do by hand, so one of the binding tools listed on that page will make your life a lot easier.