A project in C is being forced upon me. I do not have much C knowledge, but I'm assuming the answer is simple.
struct s1 {
char *text;
int num;
};
struct s2 {
struct s1 vals[5];
int numbers;
};
Assume s2 is already populated. How do access num from s1? I was assuming I would do something like
struct s2 temp;
//temp is populated somehow, doesn't matter in the case
printf("%d\n", temp.vals[0]->num);
but that doesnt work. Any suggestions?