#c++ Copy constructors and Destructors;Copy constructors and Destructors : I am learning constructors and Destructors in c++; Help me grasp my mistakes even if they are silly...

HERE is a code I have written to perform addition using classes in c++; This creates two summands of _datatype_ num and employs the constructor _sum()_ to perform sum of the two numbers; However when everything was goin' alright, I stumbled upon creating a copy constructor for num , (Although not necessary but still for practice)... without the dynamic object of the class _sum_ it is not possible to run the code anyway(without removing the copy constructor)... Help me improve my code and my mistakes in the code below; _Also I wanna know how to make use of the copy constructor in this program; the problem being that in the destructor the delete operation is being performed multiple times on the same piece of memory (I suppose)_


Here's my Code

     
    #include<iostream>
    #include<new>
    using namespace std;
    class num
    {
	public:
	int *a;
	num(int x)
	{
		try{
			a=new int;
		}catch(bad_alloc xa)
		{
			cout<<"1";
			exit(1);
		}
		*a=x;
    }
    num(){ 	}
	num(const num &ob)
    {
    	try{
    		a=new int;
		}catch(bad_alloc xa)
		{
			cout<<"1''";
			exit(2);
		}
		*a=*(ob.a);
	}
	~num(){ 
	cout<<"Destruct!!!";
	delete a;
	}
};


    class sum:public num
      {
	   public:
	   int add;
	   sum(num n1,num n2)
	   {
		add=*(n1.a)+*(n2.a);
	}
	int getsum()
	{
		return add;
	}
};

    int main()
    {
	num x=58;
	num y=82;
	sum *s=new sum(x,y);
	cout<<s->getsum();
	delete s;
	return 0;
    }


