title: Error : cannot convert ‘std::vector<float>’ to ‘float’ in initialization
body: <p>I have defined a vector of the <code>boundary_info</code> structure as <code>std::vector&lt;boundary_info&gt; nodes</code> to be used in my code for a specific purpose. While I try to <code>push_back</code> new elements into this vector in a specific function as:</p>
  
  <pre><code>void myFun()
  {
     std::vector&lt;float_type&gt; dists(9, -1.0);
     std::array&lt;float_type,9&gt; f, g;
  
     //do something - x and y are defined here
  
     nodes.push_back(boundary_info{point&lt;int&gt;{x,y}, dists, f, g, {}});
  }
  </code></pre>
  
  <p>I get the following error message :</p>
  
  <pre><code>Error 1 : cannot convert ‘std::vector&lt;float&gt;’ to ‘float’ in initialization
  Error 2 : cannot convert ‘std::array&lt;float, 9ul&gt;’ to ‘float’ in 
  initialization
  Error 3 : cannot convert ‘std::array&lt;float, 9ul&gt;’ to ‘float’ in 
  initialization
  </code></pre>
  
  <p>Error 1 is associated with <code>dists</code>, which is a vector. Errors 2 and 3 are associated with the <code>f, g</code> passed as parameters in <code>push_back</code> respectively. 
  The code is shown below. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  template &lt;typename T&gt;
  struct point //specify a point structure
  {
    T x,y;
  };
  
  struct boundary_info
  {  
    point&lt;int&gt; xy_bdary; //coordinates of a bdary point
    std::array&lt;float_type,9&gt; dist; //distance from boundary 
    std::array&lt;float_type,9&gt; f_prev, g_prev; //populations 
    std::vector&lt;int&gt; miss_dirns; //missing directions 
  };
  </code></pre>
  
  <p>I would be glad if the solution for this error would be pointed out. I have been struggling with it since half a day. </p>
  
  <p><strong>Note</strong> : I am compiling using c++11. </p>
  
  <p><strong>Edit</strong>
  You can find a minimal code of this problem reproducing the same problem at
  <a href="https://repl.it/repls/GleefulTartMarkuplanguage" rel="nofollow noreferrer">https://repl.it/repls/GleefulTartMarkuplanguage</a></p>
  
  <p>Thanks </p>