Hey guys I need some help. I'm trying to store a SCar struct into an array of Scar inside the SOwner structure, for each different SOwner, though I'm getting this error:
Incompatible types when assigning to type 'Scar' from type 'struct SCar *'
Here's some code :
typedef struct {
char name[40];
SCar cars [100];
} SOwner;
typedef struct {
char color[40];
char brand[12];
} SCar;
SOwner *ownerPTR;
SCar *carPtr
void function(){
for(i=0; i<10 ; i++){
(ownerPtr)->cars[i] = (carPtr+i); // Problem here <<<--
}
Is there any simple way to make this work out? Thanks
ownerPtr->cars[i] = carPtr[i];int n; int *p; n=p;.