title: C++ vector - push_back
body: <p>In the C++ Primer book, Chapter (3), there is the following for-loop that resets the elements in the vector to zero.</p>
  
  <pre><code>vector&lt;int&gt; ivec; //UPDATE: vector declaration
  for (vector&lt;int&gt;::size_type ix = 0; ix ! = ivec.size(); ++ix)
  ivec[ix] = 0;
  </code></pre>
  
  <p>Is the for-loop really assigning <code>0</code> values to the elements, or do we have to use the <code>push_back</code> function?</p>
  
  <p>So, is the following valid?</p>
  
  <pre><code>ivec[ix] = ix;
  </code></pre>
  
  <p>Thanks.</p>