#ifndef NUMBER_HPP
#define NUMBER_HPP
template
class Number
{
public:
Number( T value ) : m_value( value )
{
}
T value() const
{
retu
You have some of the Ts in the wrong place. It should be
template
Number& operator=( const Number& number )
{
m_value = number.value();
return *this;
}
This will let you do
Integer a(4);
Float b(6.2f);
a = b;
cout << a.value() << endl;
and it will print 6, a behaviour similar to that of the int and float types you are imitating.