title: Matrix multiplication using vector
body: <p>I'm trying to multiply matrices. This line <code>A[i][j].emplace_back(i*j);</code>cause this error: </p>
  
  <blockquote>
    <p>IntelliSense: expression must have class type</p>
  </blockquote>
  
  <p>What's wrong with this code? I also try push_back() function.</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  using matrix = vector&lt;vector&lt;double&gt;&gt;;
  
  matrix multiple(matrix A, matrix B);
  void initialize(matrix&amp; A, matrix&amp; B);
  
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      matrix A;
      matrix B;
      initialize(A, B);
      matrix C = multiple(A, B);
      return 0;
  }
  
  matrix multiple(matrix A, matrix B)
  {
      matrix C;
      for (int i = 0; i &lt; A.size(); ){
          for (int j = 0; j &lt; B.size(); ){
              for (int k = 0; k &lt; A.size();k++)
                  C[i][j] += A[i][k] * B[k][j];
          }
      }
      return C;
  }
  
  void initialize(matrix&amp; A, matrix&amp; B)
  {
      for (int i = 0; i &lt; A.size(); i++){
          for (int j = 0; j &lt; B.size(); j++){
              A[i][j].emplace_back(i*j);
              B[i][j].emplace_back(i*j);
          }
      }
  }
  </code></pre>