It's a good time to remember header files. Place the structure definition in .h file then include it in both main.c and file2.c. Now you have common structure (and other types) definition source.
A compiler knows nothing about main.c contents when processes file2.c.
Reputation Points: 1234
Solved Threads: 347
Postaholic
Offline 2,001 posts
since Jul 2008