C++ Program for DYNAMIC MEMORY ALLOCATION
//DYNAMIC MEMORY ALLOCATION
#include
#include
class matrix
{
int ***p,d1,d2,d3;
public:
matrix(){}
matrix(int a,int b,int c);
void getdata();
void display();
};
matrix :: matrix(int a,int b,int c)
{
d1=a;
d2=b;
d3=c;
p=new int **[d1];
for(int i=0;i
p[i]=new int *[d2];
for(int j=0;j
}
}
void matrix :: getdata(void)
{
cout<<"\n\nEnter data "<
for(int j=0;j
for(int k=0;k
}
}
}
void matrix :: display(void)
{
cout<<"\n\n\nDisplay function\n";
for(int i=0;i
for(int j=0;j
for(int k=0;k
cout<
}
void main()
{
clrscr();
matrix o1;
o1.getdata();
o1.display();
getch();
}