Wrong anti-spam code


Each item that bakery sells has name of type std::string and price of type double. The user inputs the names and prices. The input ends when the user provides the word endOfInput instead of a name for an item. After the items are inserted in the bakery, the user inserts a shopping list. The shopping list is an array of items that ends with the word endOfShoppingList. Create a program that prints the total price that someone has to pay for all the items on the shopping list. If any of the items on the shopping list is not in the bakery, then the program should print the number -1 instead of the total price.

Your code should replace the text // ??? // below.

#include "simple_set_and_map.cpp"
int main(){
   ssm::map<std::string, double> bakery;
   std::string itemFromUser;
   double priceFromUser;
   // ??? //
   return 0;

Your submission

Prove that you are not a robot.