I am using Linux as my programming platform and C language as my programming language.
My problem is, I define a structure in my main source file( main.c):
Header file /* include this header file in both file1.c and file2.c
strcut a {
};
struct b {
};
so header file included the declaration of both structures .
file 1.c
strcut a xyz[10]; --> struct a defined here
to use struct b here in this file
extern struct b abc[20];
/* now can use in this file */
file2.c
strcut b abc[20]; /* defined here */
to use strcut a defined in file1.c
use extern struct a xyz[10]