====== C - C++ Templates - Class Template ====== #include using namespace std; template class test { R data; public: void getdata(); void putdata(); }; template void test::getdata() { cout<<"Enter data"; cin>>data; } template void test::putdata() { cout<<"Data is"<t1; testt2; t1.getdata(); t1.putdata(); t2.getdata(); t2.putdata(); return 0; }