coding style - Struct Name Standards in C -


what naming standards data structures in c language?

for example, following code snippet picked http://www.sparknotes.com/cs/searching/hashtables/section3.rhtml:

typedef struct _hash_table_t_ {     int size;       /* size of table */     list_t **table; /* table elements */ } hash_table_t; 

why _*_ used naming struct, not typedef? _t stand for? , on...

a link pointing correct guide perfect.

i've been searching google , looking coding style guides, couldn't find relate that.

you should never copy naming conventions of c implementation or third party libraries. use naming convention not interfere (have name clashes) your code.

the use of tag names starting underscore expressly forbidden in iso c99, 7.1.3:

— identifiers begin underscore reserved use identifiers file scope in both ordinary , tag name spaces.

personally, believe using typedefs structs silly, since saving writing struct keyword in few places--information should rather not hidden behind typedef. cringe when see typedef names structs end in *_s signify typename alias struct.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -