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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ho!

--- Jim Wilson <wilson@xxxxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux