<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[vector erstellen aus c-array]]></title><description><![CDATA[<p>Hallo,<br />
kann ich auf einfache weise einen vector&lt;double&gt; aus einem c-array erstellen?<br />
Ginge das nicht auf eine solche art:</p>
<pre><code class="language-cpp">//arr ist ein vorher über operator[] gesetztes array...

std::vector&lt;double&gt; v;
&amp;v[0] = arr[0];
</code></pre>
<p>Oder so ähnlich?</p>
<p>Danke für eure HIlfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/163362/vector-erstellen-aus-c-array</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 00:23:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/163362.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 Oct 2006 21:00:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to vector erstellen aus c-array on Sat, 28 Oct 2006 21:00:23 GMT]]></title><description><![CDATA[<p>Hallo,<br />
kann ich auf einfache weise einen vector&lt;double&gt; aus einem c-array erstellen?<br />
Ginge das nicht auf eine solche art:</p>
<pre><code class="language-cpp">//arr ist ein vorher über operator[] gesetztes array...

std::vector&lt;double&gt; v;
&amp;v[0] = arr[0];
</code></pre>
<p>Oder so ähnlich?</p>
<p>Danke für eure HIlfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1163407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1163407</guid><dc:creator><![CDATA[Mati]]></dc:creator><pubDate>Sat, 28 Oct 2006 21:00:23 GMT</pubDate></item><item><title><![CDATA[Reply to vector erstellen aus c-array on Sat, 28 Oct 2006 21:15:27 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>das geht mit std::copy. Für das Array einfach Pointer auf das erste und das letzte Element übergeben.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1163418</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1163418</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 28 Oct 2006 21:15:27 GMT</pubDate></item><item><title><![CDATA[Reply to vector erstellen aus c-array on Sat, 28 Oct 2006 21:55:44 GMT]]></title><description><![CDATA[<p>Man kann den vector auch gleich mit dem Inhalt aus dem Array anlegen</p>
<pre><code class="language-cpp">const int N = .. ; // Größe von 'arr'
    double arr[N];
    arr[0] = .. ; // arr füllen
    std::vector&lt; double &gt; v( arr, arr+N );
</code></pre>
<p>Gruß<br />
Werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1163436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1163436</guid><dc:creator><![CDATA[Werner Salomon]]></dc:creator><pubDate>Sat, 28 Oct 2006 21:55:44 GMT</pubDate></item></channel></rss>