I am pretty new with templates
I have below code that I try to hide my template class behind a base interface class.
It works now but I dont know if its a good way to do what I try to do. 
For example is it possible to collect insertItem() functions in one common function also?

```
struct MyMainClass
{
    virtual void writeFirstItem() = 0;
    virtual void insertItem(int Key, int Value) = 0;
    virtual void insertItem(void* Key, int Value) = 0;
};

template<typename T>
struct MyTempClass : public MyMainClass
{
    template<typename T>
    struct cmp_str
    {
        bool operator()(typename T const a, typename T const b) const
        {
            if(a > b)
                return true;
            return false;
        };

    };

    template<>
    struct cmp_str<wchar_t*>
    {
        bool operator()(wchar_t* const a, wchar_t* const b) const
        {
            return std::wcscmp(a, b) < 0;
        };
    };

    template<>
    struct cmp_str<char*>
    {
        bool operator()(char* const a, char* const b) const
        {
            return std::strcmp(a, b) < 0;
        };
    };

    typedef std::map<typename T, int, cmp_str<typename T> > Mymap;
    typedef typename Mymap::const_iterator mymapit;

    typename Mymap mymap;

    template<typename T>
    void insert(T keyVal, int myvalue)
    {
    mymap[keyVal] = myvalue;
    };

    void writeFirstItem()
    {
        std::wcout << std::wstring(L"(") << mymap.begin()->first << L"," << mymap.begin()->second << L")" << std::endl; 
    }

    void insertItem(void* Key, int Value)
    {
        insert((T)Key, Value);
    }

    //this one shouldnt be called
    void insertItem(int Key, int Value){}
};

template<> template<>
void MyTempClass<int>::insert<int>(int keyVal, int myvalue)
{
    mymap[keyVal] = myvalue;
}

template<>
void MyTempClass<int>::insertItem(int Key, int Value)
{
    insert(Key, Value);
}

int wmain(int argc, wchar_t* argv[])
{

    MyMainClass* a;
    MyMainClass* b;
    MyMainClass* c;

    wchar_t a1[6] = L"asdf";
    wchar_t a2[6] = L"12345";
    wchar_t a3[6] = L"xyzs";
    wchar_t a4[6] = L"12345";

    int b1 = 3;
    int b2 = 5;
    int b3 = 88;
    int b4 = 3;

    char c1[6] = "casdf";
    char c2[6] = "c1234";
    char c3[6] = "cxyzs";
    char c4[6] = "c1234";

    a = new MyTempClass<wchar_t*>;
    a->insertItem(a1,3);
    a->insertItem(a2,5);
    a->insertItem(a3,9);
    a->insertItem(a4,3);

    b = new MyTempClass<int>;
    b->insertItem(b1, 4);

    c = new MyTempClass<char*>;
    c->insertItem(c1,77);
    c->insertItem(c3,99);

    a->writeFirstItem();
    b->writeFirstItem();
    c->writeFirstItem();
}

```