void Method(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
const String::Utf8Value prefix(isolate, args[0]);
const int difficulty = args[1].As<Number>()->Value();
const string solvedPow = solve(string(*prefix).c_str(), difficulty);
cout << solvedPow << endl;
args.GetReturnValue().Set(String::NewFromUtf8(isolate, solvedPow).ToLocalChecked()); // Error cannot convert
// argument 2 from const std::string to const char *
}
我真的很困惑为什么会这样,任何帮助表示赞赏。谢谢!另外,澄清一下,不,我不是在挖掘加密货币。