> > I thought members are constructed in the order in which they are
> > the class? As I wrote "int A;" first and then "int B;" my initialization
> > list should work, too?
> Yes , order of declaration is important , not order of initializers.
> So your code should work, but it looked so bad, i couldn't stay
> away from fixing it.
Quote:> And mixing initializers like this doesn't make any sense.
This was only an example. My real problem is that I have a struct class
member which should be used as a first element in a list (also class
member). I want to initialize the struct first and then initialize the list
with the just initialized struct. Something like this:
Foo::Foo(int _a, int _b) : astruct(_a, _b), alist(1, astruct)