#include <iostream>
using namespace std;
int main()
{
int i, j;
int row, column;
while( cin >> column >> row )
{
int **array = new int*[ row ];
for( i = 0; i < row; i++ )
array[ i ] = new int[ column ];
for( j = 0; j < column; j++ )
for( i = 0; i < row; i++ )
cin >> array[ i ][ j ];
for( i = 0; i < row; i++ )
{
for( j = 0; j < column; j++ )
cout << array[ i ][ j ] << " ";
cout << endl;
}
for( i = 0; i < column; i++ )
delete [] array[ i ];
delete [] array;
}
return 0;
}
小弟試了幾遍,就是如果把delete拿掉就可以AC通過
請問有哪位大大可以幫小弟解惑一下嗎? 謝謝