// Program to define in different way about the overload constructors
#include<iostream.h>
#include<conio.h>
class integer
{
private:
int a;
public:
integer()
{
a=0;
cout<<endl<<"Constructor Called. : ";
}
integer(int i)
{
a=i;
cout<<endl<<"Constructor with argument called. : ";
}
~integer()
{
cout<<endl<<"Destructor Called.";
}
void get()
{
cout<<endl<<"Enter the value of integer :" <<endl;
cin>>a;
}
void show()
{
cout<<endl<<"The value of integer is :"<<"\t"<<a;
}
};
void main()
{
clrscr();
integer x, y(10);
x.get();
x.show();
y.show();
getch();
}