This is the mail archive of the gcc-bugs@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]

Re: gnu C++ compilation problem




--- Kallol Biswas <kallolbiswas@yahoo.com> wrote:
> #gcc -v
> gcc version 2.95 19990728 (release)
> 
> The following .cpp file can't be compiled. Any
> workaround is greatly appreciated.
> 
> -------------------ll.cpp----------------------
> 
> struct ip_opts
> {
>     int x;      
>     char ip_opts[40];           /* Actually variable
> in size.  */
> };
> 
> main()
> {
> 
> struct ip_opts tmp;
> 
> tmp.x=10;
> 
> }
> 
> The error message displayed is:
> 
> gcc /tmp/ll.cpp
> /tmp/ll.cpp:4: ANSI C++ forbids data member
> `ip_opts'
> with same name as enclosing class
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com


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