title: how to add a float array to a float vector in c++
body: <p>here is the problem. I have a float vector called vec:</p>
  
  <pre><code>std::vector&lt;float&gt; vec {1.1,2.2};
  </code></pre>
  
  <p>Now there is also a float array called, arr:</p>
  
  <pre><code>float arr[]={3.3 4.4 5.5};
  </code></pre>
  
  <p>So the question is how to add the array to the vector such that at the end we get  {1.1 2.2 3.3 4.4 5.5} a longer float vector. </p>
  
  <p>I tried this, </p>
  
  <pre><code>vec.insert(vec.begin(), arr,arr+3);
  </code></pre>
  
  <p>But the compiler gives a long error starting with </p>
  
  <p>"error: no match in operator + in arr+3"</p>