Hi everybody, in a .h header file i want to declare a var as extern struct mytype a[200]; after I include the header file in a dot c file and define the var in the global scope of the dot c file as struct mytype a[200]; but the compiler complains the redefinition occurs, how to cope with it? thanks in advance.
in the h header file, i also tried declare the var as extern struct mytype *a; it differs nothing. I know if in .h file i declare extern int a; in dot c file, i define int a = 1; it would ok, why?? what's difference between the two variables?
in a .h header file i want to declare a var as extern struct mytype a[200]; after I include the header file in a dot c file and define the var in the global scope of the dot c file as struct mytype a[200]; but the compiler complains the redefinition occurs, Where have you defined struct mytype?