case Operation::DeviceAuthen:
{
std::string token = root["body"]["token"].asString();
std::string secretKey = root["body"]["secretKey"].asString();
std::string resultMesg = root["head"]["resMessage"].asString();
CMyINI *myINI = new CMyINI();
myINI->SetValue("setting", "token", token);
myINI->SetValue("setting", "secretKey", secretKey);
myINI->WriteINI(GetProgramDir() + "\\UserInfo.data");
delete myINI;
}
如上代码,只需要在case后加{}即可。