title: arma::rowvec from std::vector<int>
body: <p>I have an std::vector and I want to convert it into a arma::rowvec</p>
  
  <p>I've done:</p>
  
  <pre><code>vector&lt;int&gt; x = foo();
  rowvec a;
  
  vector&lt;int&gt;::const_iterator iter2;
  int j = 0;
  for(iter2 = x.begin(); iter2 != x.end(); ++iter2) {
      a(j++,0) =  *iter2; 
  }
  a.print("a");
  </code></pre>
  
  <p>but I get:</p>
  
  <pre><code>error: Mat::operator(): out of bounds
  
  terminate called after throwing an instance of 'std::logic_error'
    what():  
  </code></pre>
  
  <p>If instead of <code>a(j++,0) =  *iter2;</code> I use <code>a &lt;&lt; *iter2;</code> in final rowvec, I get only the last element.</p>