aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: using typedef in union
 
Similar Threads
Data Structure
Data Structure
Typedef
What is Classifier Level?
Data Structure Transfer