This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

forward declaration of `struct address_list'


HI:
   I am using the Redhat 7.3 for i386, now I compile some C++ programs.
I declared one struct address_list in A.cpp which contains another struct
structA. then I claimed one variable struct address_list which_modify in
A.cpp. now I want to operate the which_modify in another files B.cpp.
In B.cpp I used extern to tell gcc that which_modify is a variable located
in other files. But the gcc reports :

B.cxx:59: invalid use of undefined type `struct address_list'
B.cxx:18: forward declaration of `struct address_list'

what happen to this ? where is wrong with me?
thanks  for your help.

Sun Zongjun



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]