Thread overview
Compound Literals
Nov 15, 2009
Pedro Izecksohn
Nov 20, 2009
Matthew Wilson
Nov 21, 2009
Pedro Izecksohn
November 15, 2009
#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
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
Does Digital Mars plan to implement the compilation of compound literals by dmc?