if(. data File cout << "Error opening file n"; exit(O) data File <<Confucius\n data file<<"Mo-tsen” data File close(; data File open("demofile txt", ios: out ios: app); data File << Einstein data File <<"Shakespeare data File close(); return o 2-2.cppif ( ! dataFile ) { cout << "Error opening file.\n"; exit(0); } dataFile << "Confucius\n" ; dataFile << "Mo-tse\n" ; dataFile.close( ); dataFile.open("demofile.txt", ios::out | ios::app); dataFile << "Einstein\n" ; dataFile << "Shakespeare\n" ; dataFile.close( ); return 0; } 2-2.cpp