I am looking for vanilla C++98 solution (no boost, or qt, etc.)
Is there a way to do something like this :
// valid in c++ 11
std::vector<Foo> vFoo {Foo1, Foo2, Foo3, Foo4} ;
or something like this
// Well it is C# but you got the point.
List<Foo> lFoo = new List<Foo>() { Foo1, Foo2, Foo3, Foo4 };
For now, I use this one :
std::vector<Foo> vFoo;
vFoo.push_back(Foo1);
vFoo.push_back(Foo2);
vFoo.push_back(Foo3);
vFoo.push_back(Foo4);
But I find it ugly. Any idea to improve it ? Is there a special way to achieve it ?
Thank you.