title: Storing an abstract class object from a map to abstract class reference
body: <p>I am trying to implement the following method to get the bus corresponding to its name which is passed as a string to the method. Here AbstractBus is an abstract class which contains functionality of a bus. localBusses is a std::map    </p>
  
  <pre><code>void getLocalBusByName(string&amp; name, AbstractBus&amp; bus) 
  {
      bus =  localBusses.find(name)-&gt;second;
  }
  </code></pre>
  
  <p>However, I am getting an error "no operator "=" matches these operands"
  Can anyone explain what is wrong here and how can I correct it?</p>