Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The name of the C+ file must be sortNames.cpp Write a program that will read names from the file names dat. The names read from
The name of the C+ file must be sortNames.cpp Write a program that will read names from the file "names dat". The names read from the file should be stored into a string array of size 20. The program must use the insertion sort algorithm to sort the array of strings. main will first display the unsorted names, call the sorting function, and then display the sorted array Hint: You will need to use getlinemember function to read names from file into the string array (i.e. getline (inputFile, array[index])
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