Newly I've begun learning OOP.I've written simple program.But function int sum() has errors.Can you write decision of the problem.And explain errors.
class Int 
{
private:
   int num;
public
Int()
{
    num = 0;
}
Int(int n)
{
    num = n;
}
 int getValue()
{
    return num;
}
 int sum(const Int& n)
{
    return num+ n.getValue();
}
void main()
{
short a, b;
cout <<  "Enter 2 numbers:";
cin >> a >> b;
Int A(a), B(b), res;
cout << A.getValue() << " + " << B.getValue() << " = " << A.sum(B) <<"\n\n";
}
 
     
    