In addition to the members' names the first creates a new type that can be used anywhere in the code where a type fits, so tipo_lista
becomes as much of a guy as int
is a guy.
The second creates a structure called noCliente
. This doesn’t create a type, so if you want to instantiate it in an object you have to make it type struct noCliente
, since the guy is struct
with a specialization.
Of course soon after this structure is used to create a type called CLIENTE
which will always be a pointer, so it will be a type by reference that is not the pattern of structures. The use of the pointer required separation between the structure declaration and the type declaration.
I think in the first example it is incomplete; it would not be
typedef struct lista { ... } tipo_lista;
?– Jefferson Quesado
That one
lista
here you have no.– André
So this
struct lista*
ofant
andprox
refers to another structure...– Jefferson Quesado