help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler doesn't create some static class members


From: Larry I Smith
Subject: Re: Compiler doesn't create some static class members
Date: Wed, 02 Feb 2005 15:14:01 GMT
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220

Paul Pluzhnikov wrote:
Larry I Smith <larryXiXsmith@verizon.net> writes:

His example had this for the initialization code:

  const metadata A::metadata("my class A");

Since the class-static variable names are all 'meta', the
correct initialization code would be this:

  const metadata A::meta("my class A");

I assume that was just a typo.
The code as he wrote it would not compile:

$ g++ -c junk.cc
junk.cc:16: error: `const metadata A::metadata' is not a static member of 
`class A'

Cheers,

Oops, sorry.  I didn't even try his example...
Silly me.

Larry

--
Anti-spam address, change each 'X' to '.' to reply directly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]