ERROR:EXPRESSION MUST HAVE A CONSTANT VALUE が表示されます。私の行は、読み取られるすべてのファイルで変更される可能性があるため、実際に変数を使用する方法はありますか?
Image readFile(string fileName) {
ifstream file;
file.open(fileName);
int row;
int column;
Image image(0, 0);
if(file.is_open()){
file >> row;
file >> column;
}
int **row[row]; // error right here!!!!!!!!!!!!!!!!!!!!!!!!! ERROR:EXPRESSION MUST HAVE A CONSTANT VALUE
file.close();
image(row, column);
return image(row, column);
}