title: Need examples on C++ vector usage
body: <p>Given the C++ vector as below:</p>
  
  <pre><code>vector&lt;double&gt; weight;
  weight.resize(128, 0);      
  </code></pre>
  
  <p>Can weight be used as:</p>
  
  <pre><code>weight['A'] = 500.98;
  weight['P'] = 455.49;
  </code></pre>
  
  <p>What does this mean, and how does one use these values? Could anyone give me an example?</p>