[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiler doesn't create some static class members
From: |
Paul Pluzhnikov |
Subject: |
Re: Compiler doesn't create some static class members |
Date: |
01 Feb 2005 20:25:41 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
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,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.