#include #include using namespace std; char** load(int* pr, int* pc); void show(char** pic, int rows, int cols); void vflip(char** pic, int rows, int cols); void unload(char** pic, int rows); int main() { int rows, cols; char** pic = load(&rows, &cols); string cmd; while( cout << "> " && cin >> cmd && cmd != "quit" ) { if( cmd == "show" ) show(pic, rows, cols); else if ( cmd == "vflip" ) vflip(pic, rows, cols); } unload(pic, rows); return 0; } void show(char** pic, int rows, int cols) { for(int i=0; i> fname; ifstream fin(fname); if(!fin) { cout << "File doesn't exist!" << endl; exit(0); } int rows, cols; fin >> rows >> cols; char** pic = new char*[rows]; for(int i=0; i