Question: Write a program using STLs map associative container to store pairs of the form pair , where the string values are the surnames of the
Write a program using STLs map associative container to store pairs of the form pair
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\finalExam.exe < battingData.txt
Is it necessary to replace map with multimap?
Apply find to this container for Ventura.
Output the eight pairs in matching columns
Erase Abbott, 0.274 and replace it with Alfonso, 0.325
Display all entries in the map.
Refer Chapter 4 section 4.8 of the text book on Sets and Maps in the Standard Library.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
