如何在函数中使用带有指针的JSON :: Value?
更新:
string sign_pkcs(int tab)
{
Json::Value json_output;
json_output["tab"] = tab;
add_to_json_string(&json_output,"find_certificate_object","Find certificate successfully!");
>> This is using from json_output
return ...
}
void add_to_json_string(Json::Value *jsonInput,string key,string value)
{
*jsonInput[key] = value;
}
但我收到错误消息:
Error (active) E0349 no operator "[]" matches these operands
我想在代码的每一步中将其他函数的任何键和值添加到一个JSON变量中。