template problems with

the STL map class seems to work fine when I just use it with hard-coded types, but as soon as I try to wrap it with my own templates it goes crazy. I'm trying to implement a Maker prototype. The kind that you can create dynamically any derivative of a base type from mapped ids. I basically am jacking the whole thing (pretty much ALL the boiler plate code) from here class http://www.adtmag.com/joop/crarticle.asp?ID=1520.

So I put down the template like this:
class CObjectMaker
virtual ~CObjectMaker(){}
static BaseType *CreateObject(void *param, DWORD size){return Create(param, size);}
CObjectMaker(int id){makers.insert(make_pair(id, this));}
virtual BaseType *Create(void *param, DWORD size) const = 0;
typedef CObjectMaker *CObjectMakerPtr;
typedef map MakerMap;
static MakerMap makers;

And then in another file, where I want the implementation (with different makers being declared) all I have it is this:
class CStoreMaker : public CObjectMaker
CStoreMaker(int id):CObjectMaker(id){}

Basically its just a little specialization of the generic template. I haven't even begun declaring the actual makers yet. It gives me this compiler error with VS .NET:

c:Program FilesMicrosoft Visual Studio .NETVc7includextree(1133): error C2061: syntax error : identifier '_Wherenode'

Ummm...ok. Its trying to tell me that deep inside the bowels of code that I didn't write theres a problem. But wait, it must be me. So this copied code has problems? Cause I can't see it. I guess xtree is used by the map class since I think STL maps use trees instead of hashing for storage. Anyway, can anyone see where I went wrong here?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!