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: c++/7059: cannot assign a static string member of class


Synopsis: cannot assign a static string member of class

State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Thu Jun 20 15:07:58 2002
State-Changed-Why:
    Not a bug; your code is illegal.  Static class members
    must be /defined/ not just /declared/.  (The linker error
    about "undefined reference" provides a clue.)
    
    You need to add
    
    string myobj::s;
    
    somewhere in a source file.
    
    
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7059


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