You are viewing a single comment's thread. Return to all comments →
Easy to understand:
template<typename T> class AddElements { private: T element; public: AddElements(T element) : element(element){} T add(T element) { return (this->element += element); } T concatenate(T element) { this->element += (string)element; return this->element; } };
Seems like cookies are disabled on this browser, please enable them to open this website
C++ Class Templates
You are viewing a single comment's thread. Return to all comments →
Easy to understand: