I have the following scenario:
typedef struct Unidade{
int cod;
} und;
typedef struct Produto{
int cod;
char nome[100];
und unidade;
} prod;
As you can see, I have a unit-type variable inside the product. How do I record this variable and how to access it?
In unidade
write like this: u
nidade.cod = 10;
In produto
would it look like at the time of writing to this variable unidade
? And how would I read this variable later?