下面是我的 C++ 代码中显示警告的相关片段extended initializer lists only available with -std=c++0x or -std=gnu++0x
typedef struct _A{
string A1;
int A2;
} A;
vector <A*> vecA;
string str1;
int k;
vecA.push_back(new A({str1, k}));
是否有另一种更合适的方式来做 push_back?