Consider the following:
myfile.c
myfile2.cCode:#include <stdio.h> extern struct mystruct ab; int main() { ab.a = 'a'; }
c> gcc myfile.c myfile2.cCode:#include <stdio.h> struct mystruct { char a; char b; } ab; ....
When I do this I get the error:
invalid use of undefined type 'struct mystruct'
Any help would be appreciated thanks.