I try to send some struct into STL list;
struct obj {
int a;
int b;
}
list < struct obj> mylist;
struct obj a = { 0, 1};
mylist.push_back ( a);
Is there any other way to initialize argument of push_back
?
For example:
mylist.push_back ( struct obj a ={0, 1});
g++ tells me: expected primary-expression before "struct";