Question: Help need C++ cstring Exercise 1: Write a function, GetFileName, that prompts for and reads a file name from cin. Did you encapsulate the code

Help need C++ cstring Help need C++ cstring Exercise 1: Write a function, GetFileName, that promptsfor and reads a file name from cin. Did you encapsulate the

Exercise 1: Write a function, GetFileName, that prompts for and reads a file name from cin. Did you encapsulate the code to do this task in Lessons 2 and 3 into a function? If so, this exercise is already completed. Exercise 2: Program Shelll is a driver for function Compare that compares two C strings. The return value type of function Compare is CompareType (LESS. EQUAL. GREATER). Complete this program. // Program She111 is a driver for function Compare #include #include using namespace std; typedef char String20 [21] enum CompareType (LESS. EQUAL. GREATER) CompareType Compare (const String20, const String20) int main () String20 str: String20 str2: cout > strl " Do not include whitespace." endl; cout > str2 switch (Compare (strl. str2)) /I FILL IN Code to write out which string // comes first alphabetically return 0 CompareType Compare (const String20 str. const String20 str2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!