compile error when initializing descendant struct

corey taylor
Thu Apr 10 02:42:00 GMT 2008

On Wed, Apr 9, 2008 at 6:06 PM, Dave Bender <> wrote:
> struct B : public A {
>  int y;
> };
> My goal is to incorporate a large set of structs in a DSO (so that
> they reside in the read only section). I don't see why this code
> should not compile.

Have you considered using composition and then initializing A then y
in your aggregate?


More information about the Gcc-help mailing list