Thread overview | |||||
---|---|---|---|---|---|
|
November 15, 2009 Compound Literals | ||||
---|---|---|---|---|
| ||||
#include <stdio.h> typedef struct { int a; int b; } two_integers; int main () { two_integers ti = {0, 0}; printf ("ti.a = %d\tti.b = %d\n", ti.a, ti.b); ti = (two_integers) {1, 2}; printf ("ti.a = %d\tti.b = %d\n", ti.a, ti.b); return 0; } |
November 20, 2009 Re: Compound Literals | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pedro Izecksohn | What's your question? (Or are you assuming we've enough spare time to work out your question _and_ your answer?) "Pedro Izecksohn" <izecksohn@yahoo.com> wrote in message news:hdp9h3$ptq$1@digitalmars.com... > #include <stdio.h> > > typedef struct > { > int a; > int b; > } two_integers; > > int main () > { > two_integers ti = {0, 0}; > printf ("ti.a = %d\tti.b = %d\n", ti.a, ti.b); > ti = (two_integers) {1, 2}; > printf ("ti.a = %d\tti.b = %d\n", ti.a, ti.b); > return 0; > } |
November 21, 2009 Re: Compound Literals | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew Wilson | Does Digital Mars plan to implement the compilation of compound literals by dmc? |
Copyright © 1999-2021 by the D Language Foundation