Overloading struct members (or cast?)

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 18 07:42:40 PST 2014


Wsdes:

union value {
>           const char       *string;
>      }

Try:

union Value {
     const char* myString;
}

Note the upper caseing, the spacing after the star, and the 
"string" name replaced with something else.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list