The next question is about C programming. I use the Microchip C30 compiler (because I know someone will ask)
What is the difference between a structure that contains several other structures and a structure that contains several pointers to other structures? Does someone do faster code execution than another? Does one method use more or less memory? Is memory shared at the same time in both cases?
If I use the following code, is memory allocated for subStruct automatically?
typedef struct{
int a;
subStruct * b;
} mainStruct;
typedef struct{
int c;
int d;
}subStruct;
extern mainStruct myMainStruct;
mainStruct myMainStruct;
int main(void)
{
{
source
share