问题描述
所以,我明白了:
void Method(const Nan::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
int last_number = info[0]->NumberValue(context).FromJust();
info.GetReturnValue().Set(Nan::New<(fib(last_number)));
}
https://github.com/nodejs/nan 在这里使用 我需要从这个函数返回一个字符串值。函数 fib 返回一个 int 值。在这里将 int 转换为 string 的任何方法都会给我不同的错误。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)