在别人的程序中看到这种用法: typedef map< int, set<string> > t_map_sats; void main() { t_map_sats m; m[0] = { "G01","G02","G03","G04","G05","G06","G07","G08","G09","G10", "G11","G12","G13","G14","G15","G16","G17","G18","G19","G20", "G21","G22","G23","G24","G25","G26","G27","G28","G29","G30", "G31","G32" }; } 可是报错;提示大括号问题,请大神指点! |
|
10分 |
你的编译器太落后了!
|
不应该呀,用的VS2010 |
|
15分 |
Initializer lists支持需要VS2013
|
15分 |
这个应该是C++11的语法,你的编译器确实落后了,应该用VS2013 |