help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: struct member initialization


From: Grizlyk
Subject: Re: struct member initialization
Date: 3 Jan 2007 19:55:04 -0800
User-agent: G2/1.0

Paul Pluzhnikov wrote:

> Your sample is still non-compilable (you should strive to post
> complete compilable test cases), but easily fixed with 2 typedefs.

It is possible, he has used "-fms-extensions" flag.

from gxx-4.1.0 info: "-fms-extensions"
MFC compatible. Keywords "struct" and "union" are allowed without names
inside other structurers

    struct {
       int a;
       union {
         int b;
         float c;
       };
     } foo;

    Access "foo.b" is allowed. Also is allowed implicit int for
declarations, non-standard
    syntax to access to pointer to class member and maybe something
else.

    I do not know details, read info.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]