c++/7059: cannot assign a static string member of class
pme@gcc.gnu.org
pme@gcc.gnu.org
Thu Jun 20 16:05:00 GMT 2002
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
More information about the Gcc-bugs
mailing list