Question: Create a new file named: CustomerDB. t x t . A customer data file contains a list o f customers ( o n e per
Create a new file named: CustomerDB. A customer data file contains a list customers per line each customer consisting a unique customer followed a first and last name.
Mike Jones
Garcia
Sarah Lee
Stan Lee
Amy Hernandez
Ask the user enter the find.
you read from the file, search for the
found, output the customer's info Customer #: Last, First
not found, output Not Found
what I have:
#include ::ifstream
#include ::cin, ::cout
#include ::string
int main
::string idToFind; string for cases both numbers and letters, like
::cout "Enter : ;
::cin idToFind;
::string dbId;
::string dbFirstName;
::string dbLastName;
::ifstream fin;
fin.open;
fin
::cout
Error opening file for reading
;
return ;
while fin.fail
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
