passing Lua script from C++ to Lua
lua
Solution
Try using luaL_dostring, which loads and runs a given string.
Problem
I want to pass a Lua script (code that Lua interpreter can process) from C++ and get the result back. I looked online but could not find any example that would help me. I am able to call a Lua function from C++, but that requires you to create a file with Lua function.