Json::StyledWriter sj;//按标准格式写入
Json::Value root; //根为数组
const int num=10;
root["Module"]= Json::Value(num);
ofstream os;
CString documentName;
documentName.Format("%s.json",Uploding);
os.open(documentName);
os << sj.write( root);
os.close();
root["Module"]= Json::Value(num);
MFC中这条语句编译不能同过,在c++main函数中使用的却可以,,头文件都加了,请问是怎么修改?
编译错误显示:error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2040: 'root' : 'int []' differs in levels of indirection from 'Json::Value'
error C2440: 'initializing' : cannot convert from 'Json::Value' to 'int []'
Json::Value root; //根为数组
const int num=10;
root["Module"]= Json::Value(num);
ofstream os;
CString documentName;
documentName.Format("%s.json",Uploding);
os.open(documentName);
os << sj.write( root);
os.close();
root["Module"]= Json::Value(num);
MFC中这条语句编译不能同过,在c++main函数中使用的却可以,,头文件都加了,请问是怎么修改?
编译错误显示:error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2040: 'root' : 'int []' differs in levels of indirection from 'Json::Value'
error C2440: 'initializing' : cannot convert from 'Json::Value' to 'int []'