This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
forward declaration of `struct address_list'
- From: sun zongjun <szj at ccoss dot com dot cn>
- To: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 04 Jul 2002 16:33:46 +0800
- Subject: 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