title: index std/boost::map by struct element
body: <p>I have found this <a href="https://stackoverflow.com/questions/10905716/cannot-use-a-struct-as-index-of-a-map">excellent question</a> that's a slight reverse of what I want to do.</p>
  
  <p>I'm still too noob to really understand what's going on.  (I'm just now barely getting comfortable with barely more than the basic syntax)</p>
  
  <p>What I want to do is index a <code>std::map</code> of <code>struct</code>s by one of the <code>struct</code>'s elements.</p>
  
  <p>So, if I have</p>
  
  <pre><code>struct accountStruct{
       string accountName;
       double total;
  };
  </code></pre>
  
  <p>I'd like to call the <code>total</code> from <code>std/boost::map</code> of <code>accountStruct</code>s with <code>accounts[accountName].total</code>.</p>
  
  <p>Please show me how.</p>