Lua中变量的内存RAM地址 [英] Memory RAM address of a variable in Lua
本文介绍了Lua中变量的内存RAM地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在C ++中访问以语言Lua ???
声明的变量的内存地址(例如在书面Lua中):
X = 10
如何访问变量X的内存地址是在Lua上宣布的吗?
address =(& X)
$ b
帮助我!
解决方案
使用: -
- lua_getfield
- lua_setfield
请参阅...
http://www.lua.org/manual/5.1/manual。 html
的说明和示例。
How to access in C++, the memory address of a variable declared in the language Lua???
in other words (example in written Lua):
X = 10
How to access the memory address of the variable X, which was declared on the Lua?
address = (&X) ?????????
Help me please!!
解决方案
You don't, you ask the Lua API for the value of the variable, or set it.
use :-
- lua_getfield
- lua_setfield
refer...
http://www.lua.org/manual/5.1/manual.html
for a description and examples.
这篇关于Lua中变量的内存RAM地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文