您好,我正在尝试在 C++ 应用程序中使用 Squirrel。出于这个原因,我想在 C++ 中注册一个 Squirrel 类。
我们以下面的类为例。
class Foo
{
constructor(value)
{
::print("constructor called");
this.testValue = value;
}
function saySomething()
{
::print("The value is: " + this.testValue);
}
testValue = 0;
}
谁能告诉我如何在 C++ 中绑定它?