What does _Person mean?


#1

In working through the struct section I was wondering what _Person means on page 66.

Above that we created the typedef Person. Can you clarify what this means when you insert the _Person?

typedef struct _Person { float heightInMeters; int weightInKilos; } Person;

Thanks.


#2

Forrest, you have found an error. I think I can fix it for the second printing. Thank you.

The code is fine, but it is inconsistent with the same line above. The declaration in your message means that you can use either the full name:

or take advantage of the typedef (which is sort of an alias):


#3

Thanks Aaron.


#4

so code for struct didn’t change and should be same as in previous listing, right?:

typedef struct { float heightInMeters; int weightInKilos; } Person;


#5

That is correct.