How does inclusion of header file happen?
I have a plain C code with *.c and *.h files in the workspace. I have a header file 1.h declaring some structure as struct my1 { int a; .. .. }my_t; But when i try to declare a variable of type struct my1 in another header file 2.h as follows:- struct my1 variable1; It gives error at this declaration point. Looks like my1 is undefined here in 2.h file. In file 1.h I need to include 2.h, so in file 2.h I cannot include 1.h, for fear of recursive inclusion. My question is:- What do i need to declare to resolve the compilation error in this case? This whole thing made me think about further