This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "using typedef in union" Watch "using typedef in union" New topic
Author

using typedef in union

Anand Damodaran
Greenhorn

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;
}b;
char a[sizeof(struct bio)];

};

it works well if i remove typedef keyword.

why is it so?


with respect
Anand
 
 
subject: using typedef in union