This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: To get the size of a member of a struct


Hi Ho!

--- Jim Wilson <wilson@tuliptree.org> wrote:
> 
> It should work, but may not be the best solution.
> 
> Another solution is to define a type you can query, e.g. 
> 
> typedef char name_t[50];
> and then use this in the struct definition and in the sizeof call.

I think this is good. But, not everyone likes to use typedef, for example, Linus
Torvalds as he mentioned not to use typedef in the Linux kernel coding guideline
:)

> Jim

Best regards,
Eus


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]