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

RE: [LC++]How to define a static map member?



Title: RE: [LC++]How to define a static map member?

> I am trying to have get a static member of a class to be of type
>     map<const string, pointer*>.
>
> What is the correct way for doing it?

Your way is correct, but you haven't defined the variable.
In one of your cpp files, add:

map<const string,pointer*> category::allCategories;

--
Vincent Penquerc'h