The following code gives me a Compile error "incompatible types at assignment"
File 1:
struct a{
int b;
}
File 2:
static struct a c;
void test(){
c.b = 0;
}
struct a getStruct(){
test();
return c;
}
File 3:
static struct a d;
void setStruct(){
d = getStruct(); (<-- Error)
}
I've searched for this and can't find my mistake.