Write a program using STL’s map associative container to store pairs of the form pair<string, double>, where the string values are the surnames of the eight position players for the New York Mets who started the baseball game against the Montreal Expos on September 17, 2000, and for which the corresponding double value is that players batting average:
“Agbayani”, 0.294
“Payton”, 0.290
“Hamilton”, 0.284
“Piazza”, 0.327.
“Ventura”, 0.231
“Zeile”, 0.274
“Abbot”, 0.274
“Bordick”, 0.267
These values should not be hard-coded in the program. They should be read from the standard input (cin). Of course, you'll want to use files to store your test input cases so that you don't have to type everything in every time you run it. Remember that you can redirect the contents of a file to be cin for a program with the < operator on the command line. For example:
C:\users\bob\[login to view URL] < [login to view URL]
a. Is it necessary to replace map with multimap?
b. Apply find to this container for “Ventura”.
c. Output the eight pairs in matching columns
d. Erase “Abbott”, 0.274 and replace it with “Alfonso”, 0.325
e. Display all entries in the map.
Hello!
I think could complete your project. I am C++ programmer with 2+ years of practical experience. I have worked with personal projects mainly and some assignament of other persons.
I have experience with STL data structure as: list, vector and map.