title: Typecasting std: :vector<double> to Eigen: :VectorXd?
body: <p>I have looked hard online for an answer; however, none of the provided ones fix my issue.</p>
  
  <p>I have tried this so far</p>
  
  <pre><code>#include &lt;Eigen/Dense&gt;
  #include &lt;vector&gt;
  /*More code goes here*/
  ...
  std::vector&lt;double&gt; _0to99;
  /*putting values into the vector*/
  Eigen::VectorXi X = Eigen::Map&lt;Eigen::VectorXi&gt;(_0to99.data(), _0to99.size());
  </code></pre>
  
  <p>However, Visual Studio tells me this error:</p>
  
  <p>no instance of constructor "Eigen::Map::Map [with PlainObjectType=Eigen::Matrix, MapOptions=0, StrideType=Eigen::Stride&lt;0, 0>]" matches the argument list</p>
  
  <p>and</p>
  
  <p>'&lt; function-style-cast>': cannot convert from 'initializer list' to 'Eigen::Map>'</p>
  
  <p>Any sort of help would be highly appreciated! Have a wonderful day!</p>