http://*.com/questions/2700646/dereferencing-pointer-to-incomplete-type
What do you mean, the error only shows up when you assign? For example on GCC, with no assignment in sight:
The error is at line 6, that's where I used an incomplete type as if it were a complete type. I was fine up until then. The mistake is that you should have included whatever header defines the type. But the compiler can't possibly guess what line that should have been included at: any line outside of a function would be fine, pretty much. Neither is it going to go trawling through every text file on your system, looking for a header that defines it, and suggest you should include that. Alternatively (good point, potatoswatter), the error is at the line where |