#include<iostream.h>
#include<conio.h>
class SealedClass
{
private:
SealedClass(){}
public:
int A;
static SealedClass GetInstance()
{
SealedClass sealedclassObj;
return sealedclassObj;
}
};
class Inherited : SealedClass
{
public:
Inherited() {};
};
void main()
{
int i;
clrscr();
SealedClass SC = SealedClass::GetInstance();
SC.A = 10;
SealedClass SC1 = SealedClass::GetInstance();
SC1.A = 20;
cout << "SC.A = " << SC.A << "\n";
cout << "SC1.A = " << SC1.A;
getch();
}