void creatArray(int** &p, size_t row, size_t col)
{
p = new int*[row];
if(p == NULL)
{
throw runtime_error("new row fail.");
}
for(size_t r = 0; r < row; ++r)
{
p[r] = new int[col];
if(p[r] == NULL)
{
throw runtime_error("new col fail.");
}
}
}