title: What is the difference between matrix.size() and matrix[0].size()?
body: <p>In the code below, what exactly is the difference between <code>matrix.size()</code> and <code>matrix[0].size()</code>?</p>
  <pre><code>int matrixElementsSum(std::vector&lt;std::vector&lt;int&gt;&gt; m) {
      int s = 0;
      for (int j = 0; j &lt; m[0].size(); j++) {
          for (int i = 0; i &lt; m.size(); i++) {
              if (m[i][j] == 0) {
                  break;
              }
              s += m[i][j];
          }
      }
      return s;
  }
  </code></pre>