I have a
struct OpDesc {
std::string OPName;
size_t OPArgsMin;
bool IsVaribaleArgsNum;
bool IsOPChange;
std::string ChangeNodeOP;
std::string ChangeNodeLabel;
bool IsOPDelete;
const char* ErrMsg;
};
And want to init a std::map<string, OpDesc>
.
I tried doing it this way :
typedef std::map<std::string,struct OpDesc> OpDescMap;
OpDescMap opDesc;
opDesc["StoreOp"] = {"StoreOp",2,false,false,"","",false,""};
/// etc.
I can't compile that with VS10. I get : error C2059: syntax error : '{'
How can it be solved?