i wanted to create a template class with a static function
template <typename T>
class Memory
{
public:
template < typename T>
static <T>* alloc( int dim )
{
T *tmp = new T [ dim ];
return tmp;
};
}
but i will always get
int *a = Memory::alloc<int>(5)
i dont know what to chance..
»template<class T> class Memory« used without template parameters
expected primary-expression before »int«
Fehler: expected »,« or »;« before »int«