No. You don't need a "pointer-to-a-pointer-to-an-integer", because you are only allocating an array of integers: a "pointer-to-an-integer" - and most modern compilers will give you an error when you try, because you cannot convert an "int*" to an "int**".
If you want to use the code as it is, then remove one '*' from the declaration of "p".
Otherwise, you have to be moire sophisticated in your coding:
int main()
{
int **p, i;
p=new int*[10];
for(i = 0; i < 10; i++)
{
p[i] = new int[5];
}
...
for(i = 0; i < 10; i++)
{
delete[] p[i];
}
delete[] p;
return 0;
}