#include<iostream.h>
#include<conio.h>
class base
{
private:
int a;
public:
class nested
{
private:
int b;
public:
{
b=y;
}
void displayn()
{
cout<<"\n nested value is="<<b;
}
} n;
{
a=x;
}
void display()
{
cout<<"\n Base Value is="<<a;
}
} ;
main()
{
clrscr();
base b1;
b1.getdata(5);
b1.display();
b1.n.getdatan(7);
b1.n.displayn();
getch();
}
No comments:
Post a Comment