forward declaration of `struct address_list'
sun zongjun
szj@ccoss.com.cn
Thu Jul 4 02:08:00 GMT 2002
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
More information about the Gcc
mailing list