i try to make simple template class but in the dtor it gives compilation error: this is what i have :
#include <map>
template<class k , class v>
class ObjectMap
{
public:
ObjectMap(k key, v value)
{
InnerObjectMap = new std::map<key, value>();
}
~ObjectMap();
private:
std::map<k,v> *InnerObjectMap;
};
and here is the cpp file that has only the dtor
#include "ObjectMap.h"
ObjectMap::~ObjectMap()
{
}
put im getting the compilation error :
1> ObjectMap.cpp
1>\objectmap.cpp(6): error C2955: 'ObjectMap' : use of class template requires template argument list
1> \objectmap.h(10) : see declaration of 'ObjectMap'
1> \objectmap.h(10) : see declaration of 'ObjectMap'
1>\objectmap.cpp(7): error C2509: '{dtor}' : member function not declared in 'ObjectMap'
1> \objectmap.h(10) : see declaration of 'ObjectMap'
1>\objectmap.cpp(7): fatal error C1903: unable to recover from previous error(s); stopping compilation
what im doing wrong here ?