#include<iostream> #include<map> #include<string> #include<conio.h> #include<list> using namespace std; template<class T> class Test { map<string,T> mobj; public: void getData(); map<string,T> show(); list<Test> Myshow(); }; template<class T> Test<T>::Myshow() //This is giving error { return 0; } template<class T> void Test<T>::getData() { this->mobj.insert(pair<string,T>("","")); } int main() { getch(); return 0; }
template<class T> Test<T>::Myshow() //This is giving error
MyShow
template<class T> list<Test<T> > Test<T>::Myshow() //This is NOT giving error { return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)