This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes C / C++ and the fly likes using typedef in union Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "using typedef in union" Watch "using typedef in union" New topic

using typedef in union

Anand Damodaran

Joined: Oct 04, 2012
Posts: 21
Hi Friends,
I can't able to declare typedef in the union,say,

union xyz{
typedef struct bio{
char name[100];
int age;
float salary;
char a[sizeof(struct bio)];


it works well if i remove typedef keyword.

why is it so?

with respect
Don't get me started about those stupid light bulbs.
subject: using typedef in union
It's not a secret anymore!