Thread overview | |||||
---|---|---|---|---|---|
|
May 13, 2007 initialising inner struct | ||||
---|---|---|---|---|
| ||||
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 13, 2007 Re: initialising inner struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Ferenczi | 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 13, 2007 Re: initialising inner struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to Manfred Nowak | 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!
|
Copyright © 1999-2021 by the D Language Foundation