template<class T>
class Object
{
public:
Object(std::string& name, const T& value):nameVal(name), objectVal(value){};
~Object();
private:
std::string& nameVal;
const T objectVal;
};
std::string new("Good");
std::string old("Bad");
Object<int> p(new, 2);
Object<int> s(old, 20);
p = s;
Login in to like
Login in to comment