I have the following code below.
typedef struct person Person;
Person {
char* name;
int age;
};
From what I understand, typedef will substitute "struct person" with Person. So when making the struct, it is equal to writing :
struct person {
char* name;
int age;
};
Is this thinking correct? Because I am getting an error an error of the first line of the struct.
error: expected identifier or ‘(’ before ‘{’ token This error is referring to the line : Person {
Any help is appreciated. Thanks