[lug] Can't create union with classes that have copy CTOR's?
Scott A. Herod
herod at interact-tv.com
Fri Mar 22 13:23:36 MST 2002
Ick, trying to type with the book held open by the keyboard. It really
says, "... of a union if the object's class ...".
Scott
"Scott A. Herod" wrote:
>
> To quote Herbert Schildt's _C/C++ Programmer's Reference_ page9
> paragragh 4,
>
> "Finally, no object can be a member of a union of object's class
> explicitly defines a constructor or destructor funtions."
>
> Scott
>
> LittleViggy at alum.manhattan.edu wrote:
> >
> > Hey all,
> >
> > I'm trying to create a union of 5 classes. All five have copy constructors,
> > and the compiler is erroring out. Albeit, I'm using Microsoft (sorry), but
> > there's nothing in their documentation that says this is specific to M$.
> >
> > Is this ANSI complient? You can't create a union of classes with copy CTOR's?
> > If so, why not?
> >
> > Viggy
More information about the LUG
mailing list