-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
Description
Sorry, I don't know if the question is right here, but I really needs help.
I need to convert json str to QString, and I defines the from_json function,
void from_json(const json& j, QString& str)
{
str = QString::fromStdString(j.get<std::string>());
}json object = {{"string","string"}};
then I code this ,
QString str = object["string"];
it works no problem.but when I code this,
QString str;
str = object["string"];
then the compiler do not know how to compile,error with
Error: C2593: "operator =" is not clear
Do non-built-in variables can not be pre-defined? (I tried int and double type,it can work,)
Reactions are currently unavailable