Question: Language: C++ Write a program which creates a collection of names and birthday dates. Your program should read the data from a file called data.txt

Language: C++ Write a program which creates a collection of names and birthday dates. Your program should read the data from a file called data.txt which contains a name followed by a corresponding birthday date on different lines repeated for many persons. A name consists of first name and last name separated by space. Your program should read the content of the file and use a map to store names and birthday dates. Then simulate querying your collection (i.e., the map) by asking for a name from the keyboard and printing on the standard output the corresponding birthday date. If the name is not in your container then print Name not found! on the screen. You can assume that the input will be valid and the content of the file will be valid if existing

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!