Alexander Mahr said:
Now I know what I got wrong all the time. As you said I forgot to define the
static member,
because I thought I would have done this already in the class decleration.
When then the error
appeared I browsed MSDN and google for an explenation and I found something
which tells
static (which is really a bit overloaded) causes variables to be "not
extern" and since I used
two files and accesd the static data member from the other file I thought
this was the reason
for the lnk error.
This is just my opinion, but this is one of the weaknesses of C++. In an
effort to avoid adding new keywords which might make some C programs be not
compatible, in the long run they probably wasted far more time with all the
confusion these sorts of things have caused programmers, such as yourself.
Yes, it's called "code", but that doesn't mean it really has to be
enigmatic. (This isn't a perfect example, because the confusing meaning of
static already existed in C. For a better example, would the world really
have stopped spinning if they added a purevirtual keyword? Or abstractclass
for that matter?)