I've looked over the code and everything looks fine. It won't compile though.
I've looked over the code and everything looks fine. It won't compile though.
ok..these are some of the big mistakes programmers make..since you are doing a template class..you gotta remember the rules..look at this example
when you are writing the functions definitions outside the class definition you have to keep putting your 'template<class t>' and when you get to the scope resolution operator for your class likeCode:template<class t> Something { public: Something(); int sum(int x, int y); // a member function prototype private: t value; }; //now in the cpp file template<class t> Something<t>::Something() { //does nothing } template<class t> int Something<t>::sum(int x, int y) { return x+y; };
Something:: you have to put 'returntype Something<t>::functionname' over and over and over..so the compiler knows it a template class...that is all
nextus, the samurai warrior