Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
#include problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="arnuld, post: 4245675"] fileA.h was incomplete, here it is: #ifndef TEST_HEADERS_A #define TEST_HEADERS_A #include "fileB.h" struct myStruct_A { int num; }; void use_print_values(void); #endif ============ OUTPUT ============== [arnuld@dune C]$ gcc -ansi -pedantic -Wall -Wextra -c fileB.c In file included from fileA.h:4, from fileB.c:2: fileB.h:6: warning: ‘struct myStruct_A’ declared inside parameter list fileB.h:6: warning: its scope is only this definition or declaration, which is probably not what you want fileB.c:6: error: conflicting types for ‘print_values’ fileB.h:6: error: previous declaration of ‘print_values’ was here [arnuld@dune C]$ Header A asks for Header B and Header B asks for Header A, recursive issue, anyway to solve this ? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
#include problem
Top