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; }
As in the above code, just add {} after the case.