www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



digitalmars.D.learn - initialising inner struct

↑ ↓ ← 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
↑ ↓ 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
↑ ↓ → 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