Categories
c

Naming convention when using STRUCT in C

I’m learning C and find someone defined a struct, its struct name has _ in front of it. This is my first time seen it, can someone tell me a little bit more about it? Why someone would use _aStructName instead of aStructName, what are the benefits?

struct _huffmanNode {
int value;
uint32_t frequency;
int hasChild;
struct _huffmanNode *child[2];
struct _huffmanNode *next;
};

similarly I find someone using this kind of naming convention in the following code:

typedef struct HuffCode_ {
unsigned char used;
unsigned short code;
unsigned char size;
} HuffCode;