Wrong anti-spam code

Formulation

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<iostream>
#include<map>
int main(){
   std::map<std::string, double> bakery;
   std::string itemFromUser;
   double priceFromUser;
   std::cin>>itemFromUser;
   while(itemFromUser!="endOfInput"){
      std::cin>>priceFromUser;
      bakery[itemFromUser]=priceFromUser;
      std::cin>>itemFromUser;
   }
   // ??? //
   return 0;
}

Your submission


Picture
Prove that you are not a robot.