#include<iostream.h>
#include<conio.h>
class demo
{
                int x;
public:
                demo(int y)
                                {
                                x=y;
                                display();
                                }
                void display()
                                {
                                cout<<"X = "<<x<<endl;
                                }
};
void main()
                {
                clrscr();
                demo d(50);
                getch();
}

163

Advertisements