C language defined manner about the structure

When learning C / C ++ programming, we will make extensive use of the structure; STATEMENT structure, the following two statements:

typedef struct{
char a;
short b;
int c;
}struct_1;

struct struct_2{
char d;
short e;
int f;
};

By these two methods can be declared structure, the above code declares sturct_1 and sturct_2 two structures. Let's look at the structure definition of what is the difference between these two approaches:

struct struct_1 obj1;
struct_2 obj2;

Different declaratively defined in different ways, bloggers are more inclined to the second statement manner.

Guess you like

Origin www.cnblogs.com/showtime20190824/p/11470450.html