Question: write in C++ Write a program that asks a user to enter 10 names. If the name contains the letters A or a, write the
write in C++
Write a program that asks a user to enter 10 names. If the name contains the letters A or a, write the name to a file named A_Names.txt. Otherwise, write the names to a different file named Other_Names.txt. Your program should use either a for or while loop to repeatedly get the names. Hint: The function find can be applied to string objects. It accepts a single character as a parameter. It returns the location of that character in the string if the character is found. Otherwise it returns -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
