Hello,
From within a function, I'm trying to give data to certain members of a struct that I created. The struct also has an enum type that I created in it. Say this is the struct and the enum:
typedef enum {cat, dog, rabbit} Animal;
typedef struct {
Animal petType;
int age;
} PetInfo;
Now I want to set the enum type in a function called from my main. How do I pass the struct into the function (as a pointer??) and how do I assign data into the struct from my function when im using a pointer?!?! if I have to... I think it maybe has to do something with the '.' or '->' but I'm not sure. Any help would be appreciated!!