#include
class digital
{
private:
int m_num;
public:
digital(int num=0)
{
this->m_num=num;
}
~digital(){};
int GetNum()
{
return m_num;
}
digital operator + (digital x)
{
digital y;
y.m_num=this->m_num+x.m_num;
return y;
}
digital operator * (digital x)
{
digital y;
y.m_num=this->m_num*x.m_num;
return y;
}
digital operator / (digital x)
{
digital y;
y.m_num=this->m_num / x.m_num;
return y;
}
digital operator - (digital x)
{
digital y;
y.m_num = this->m_num - x.m_num;
return y;
}
};
void main()
{
digital a(3);
digital b(3);
cout<<(a+b).GetNum()<