崩潰案例
struct ValTest{
Json::Value bugJson;
};
ValTest test;
int main(int argc, _TCHAR* argv[]){
test.bugJson["init"] = 123;
return 0;
}
程序退出時引發崩潰。
解決辦法:在構造函數中加入
bugJson["init"] = 123;
內容可以隨便寫,但是要初始賦值一次
崩潰案例
struct ValTest{
Json::Value bugJson;
};
ValTest test;
int main(int argc, _TCHAR* argv[]){
test.bugJson["init"] = 123;
return 0;
}
程序退出時引發崩潰。
解決辦法:在構造函數中加入
bugJson["init"] = 123;
內容可以隨便寫,但是要初始賦值一次