Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program using vectors that allows a user to maintain an inventory of wha

ID: 3772364 • Letter: W

Question

Write a program using vectors that allows a user to maintain an inventory of what they are carrying. The program should allow the user to see everything they are holding, add something to their inventory and drop something from their inventory. So, code will say: 1.See inventory 2. Add to inventory 3. Remove from inventory. One will print out what they currently have. Two will say, "what will you want to add", and let them enter a string. It will then be added to inventory (push) Three will say "Which do you want to drop" which will let them enter a number. It then will be removed from inventory (erase)

Explanation / Answer

create a function that adds an item called a Nanidoc to the inventory vector called Items and increment the counter for it in the map.

01 #include <map>
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote