Thursday, December 13, 2012

write a program of constructor in c++


#include<iostream.h>
#include<conio.h>
class Demo
{
public:
Demo()
{
cout<<"this is default constuctor \nand it is called automaticaly";
}
};
void main()
{
clrscr();
Demo obj;
getch();

Output