How dynamic memory can be applied on Multidimensional array?

Below is the application of dynamic memory used on single array per your tutorial. But, how to apply on multidimensional array, such as p[i][j]?
=========================================================================
#include<iostream>
using namespace std;

int main()

{
long i,n;
int* p;
cout<<"How many no. would like to type?";
cin>>i;
p=new(nothrow) int[i];
if (p==0) cout<<"Error,... ";
else
{
for (n=0;n<i;n++){cout<<"Enter no, ";cin>>p[n];}
cout<<"Have entered :";
for (n=0;n<i;n++)cout<<p[n]<<", ";
delete[] p;
}
return 0;
}
=============================================================
Tks.
Topic archived. No new replies allowed.