Re: [c-prog] 2D array array

2007-08-05 Thread dhaval shah
yeh why not mano M <[EMAIL PROTECTED]> wrote: Can we allocate 2D array (dynamically) in one line. int **p; int i,j; std::cin>>i>>j; p=new int[i][j]; -- delete [][]p; Is the above code snippet acceptable? Thanks, Manoj --

Re: [c-prog] 2D array array

2007-08-04 Thread Thomas Hruska
mano M wrote: > Can we allocate 2D array (dynamically) in one line. > > int **p; > > int i,j; > std::cin>>i>>j; > > p=new int[i][j]; > > > -- > > > delete [][]p; > > > Is the above code snippet acceptabl

[c-prog] 2D array array

2007-08-04 Thread mano M
Can we allocate 2D array (dynamically) in one line. int **p; int i,j; std::cin>>i>>j; p=new int[i][j]; -- delete [][]p; Is the above code snippet acceptable? Thanks, Manoj --