In a loop, prompt the user to enter name data consisting of a first name, middle initial, last name, and employee number (type unsigned long) Then, using formatted LO with the insertion () operator, write these four data items to an ofstream object. Don't forget that strings must be terminated with a space or other whitespace character. When the user indicates that no more name data will be entered, close the ofstream object, open an ifstream object, read and display all the data in the file, and terminate the program.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here