title: Assigning / copying 1D vector to a 2D vector
body: <p>I have loaded data from a text file in a 2D vector. I am extracting data column wise, finding min, max in every column and then normalizing it. Normalized data is stored in a separate temp vector, keeping in mind that i extracted data from column therefore it should go back to columns.
  I need to reconstruct the original 2D vector back from the normalized individual temp vector.</p>
  
  <pre><code> vector &lt;vector&lt;double&gt; &gt;loadedData;
   vector &lt;double&gt; normal;
   vector &lt;double&gt; temp;
   vector &lt;vector &lt;double&gt; &gt;normalDataFrom1D;
   normalDataFrom1D.resize(rows, vector&lt;double&gt;(cols,0.0));
  
   loadedData = net.loadData(file);
   int cols = net.no_of_cols("../sampleData.txt");
   int rows = net.no_of_rows("../sampleData.txt");
  
      for(int i=0;i&lt;cols;i++){
        min = net.min_1d(i);
        max = net.max_1d(i);
        cout&lt;&lt;"Min val in Col ["&lt;&lt;i&lt;&lt;"] data :"&lt;&lt;min&lt;&lt;endl;
        cout&lt;&lt;"Max val in Col ["&lt;&lt;i&lt;&lt;"] data :"&lt;&lt;max&lt;&lt;endl;
        normal = net.extract_1d(i);
        temp = net.normalizeData_1d(normal, min, max);  
  
        for(int r=0;r&lt;normalDataFrom1D.size();r++){
          for(int c=0;c&lt;normalDataFrom1D[r].size();c++){
            normalDataFrom1D[c][r] = temp;
          }
        }
      }
  //Printing Data...
      for(int r=0;r&lt;normalDataFrom1D.size();r++){
        for(int c=0;c&lt;normalDataFrom1D[r].size();c++){
          cout&lt;&lt;"Data in normalDataFrom1D["&lt;&lt;r&lt;&lt;"]["&lt;&lt;c&lt;&lt;"] = "&lt;&lt;normalDataFrom1D[r][c]&lt;&lt;endl;
        }
      }
  
  error: cannot convert ‘std::vector&lt;double&gt;’ to ‘double’ in assignment
             normalDataFrom1D[c][r] = temp;
  </code></pre>
  
  <p>If i try:</p>
  
  <pre><code>temp[i].push_back(net.normalizeData_1d(normal, min, max));
  </code></pre>
  
  <p>It says:</p>
  
  <pre><code>error: request for member ‘push_back’ in ‘temp.std::vector&lt;_Tp, _Alloc&gt;::operator[]&lt;double, std::allocator&lt;double&gt; &gt;(((std::vector&lt;double&gt;::size_type)i))’, which is of non-class type ‘double’
         temp[i].push_back(net.normalizeData_1d(normal, min, max));
  </code></pre>