[lug] Can't create union with classes that have copy CTOR's?

Scott A. Herod herod at interact-tv.com
Fri Mar 22 13:19:00 MST 2002


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
> 
> -------------------------------------------------------------
>      This message was sent from Peak to Peak Internet.
>  DSL - V.90 modems - Web Hosting and Business connectivity
>           Please visit!  http://www.peakpeak.com
>                     (888)-600-PEAK
> -------------------------------------------------------------
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list