#include #include #include #include #include using namespace std; class Actor { public: string name; map movies; map years; }; class Movie { public: string name; int year; map actors; }; class Year { public: int year; map movies; map actors; }; main(int argc, char **argv) { ifstream fin; int i, j; string s; for (i = 1; i < argc; i++) { fin.open(argv[i]); if (fin.fail()) { cerr << "Problem opening " << argv[i] << endl; exit(1); } s = argv[i]; j = s.find(".txt"); if (j == string::npos) { cerr << "File does not have a .txt extension: " << s << endl; exit(1); } s.resize(j); for (j = 0; j < s.length(); j++) { if (s[j] == '-') s[j] = ' '; } cout << s << endl; fin.close(); fin.clear(); } exit(0); }