G
Glen Able
Kindly consider:
struct MyStruct
{
Foo* foo;
Bar& bar;
};
void Blah(Foo* foo, Bar& bar)
{
// create+initialise struct
MyStruct m = {foo, bar};
}
This works fine on a gcc port. However vc6/.net give this cryptic error:
'm' : non-aggregates cannot be initialized with initializer list.
It appears that it's the Bar& that's the problem, not the Foo*. Anyone able
to shed light on this for me?
thanks,
G.A.
struct MyStruct
{
Foo* foo;
Bar& bar;
};
void Blah(Foo* foo, Bar& bar)
{
// create+initialise struct
MyStruct m = {foo, bar};
}
This works fine on a gcc port. However vc6/.net give this cryptic error:
'm' : non-aggregates cannot be initialized with initializer list.
It appears that it's the Bar& that's the problem, not the Foo*. Anyone able
to shed light on this for me?
thanks,
G.A.