www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - initialising inner struct

reply David Ferenczi <raggae ferenczi.net> writes:
I can't find out how to initialise the inner struct.

struct A
{
        int a;
        struc B
        {
                int b;
        }
}

A dataA = { a:0, ??? };

Could someone help me?

Thanks,
David
May 12 2007
parent reply Manfred Nowak <svv1999 hotmail.com> writes:
David Ferenczi wrote

 Could someone help me?
struct A { int a; struct B { int b; } B b; // needs a declaration } A dataA = { a:0, { b:0} }; -manfred
May 12 2007
parent David Ferenczi <raggae ferenczi.net> writes:
Manfred Nowak wrote:

 David Ferenczi wrote
 
 Could someone help me?
struct A { int a; struct B { int b; } B b; // needs a declaration } A dataA = { a:0, { b:0} }; -manfred
Hey, it was quick! Many thanks!
May 12 2007