Constructor which haven't any argument or parameter called default constructor. When class haven't any constructor compiler generate default constructor . #include<iostream.h> #include<conio.h> class A{ int x; int y; public: A(){ x=5; y=6; } void display(){ cout<<x<<" "<<y<<endl; } }; void main(){ A obj, obj1; clrscr(); obj.display(); obj1.display(); getch(); }