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

160

Advertisements