data file open( demofile txt", ios: in); if (!data File) cout << File open error!"<< endl; exit(o for(int count =0; count <4; count++) dataFile > name cout < name < endl: data File close(; 2-6.cppdataFile.open("demofile.txt", ios::in); if ( !dataFile) { cout << "File open error!" << endl; exit(0); } for(int count = 0; count < 4; count++) { dataFile >> name; cout << name << endl; } dataFile.close( ); } 2-6.cpp