Question
In C++ Write a program that reads first names from a text file. Names do not contain spaces, and are separated with a newline character
In C++
Write a program that reads first names from a text file. Names do not contain spaces, and are separated with a newline character (one name per line). Prompt the user for the name of the text file. Once all names have been read, display on the console the name that would be first in alphabetical order, and the name that would be last in alphabetical order. User string comparisons < and >; do not try to implement a sorting routine. Do not read the data into an array. When testing your program, create a text file on your desktop, such as C:\Desktop ames.txt.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started