<?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&amp;lt;float[3]&amp;gt; macht Probleme]]></title><description><![CDATA[<p>Also ich habe einen Typ</p>
<pre><code class="language-cpp">typedef tVector3d float[3];
</code></pre>
<p>und einen Vektor</p>
<pre><code class="language-cpp">vector&lt;tVector3d&gt; data;
</code></pre>
<p>wenn ich jetzt etwas in der Richtung tue</p>
<pre><code class="language-cpp">tVector3d t;
  ...
  data.push_back(t);
</code></pre>
<p>Bekomme ich vom Compiler diese Meldung:</p>
<blockquote>
<p>C:/Dev-Cpp/include/c++/3.4.2/bits/stl_construct.h: In function `void std::_Construct(_T1*, const _T2&amp;) [with _T1 = float[3], _T2 = float[3&rsqb;&rsqb;':</p>
<p>C:/Dev-Cpp/include/c++/3.4.2/bits/stl_vector.h:560: instantiated from `void std::vector&lt;_Tp, _Alloc&gt;::push_back(const _Tp&amp;) [with _Tp = float[3], _Alloc = std::allocator&lt;float[3]&gt;]'<br />
cmyobj.cpp:25: instantiated from here<br />
C:/Dev-Cpp/include/c++/3.4.2/bits/stl_construct.h:81: error: ISO C++ forbids initialization in array new</p>
</blockquote>
<p>kann mir jemand erklären, warum und wie ich dann trotzdem zu meinem Array komme?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/127029/vector-lt-float-3-gt-macht-probleme</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 22:08:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/127029.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Nov 2005 19:36:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to vector&amp;lt;float[3]&amp;gt; macht Probleme on Sun, 20 Nov 2005 19:40:03 GMT]]></title><description><![CDATA[<p>Also ich habe einen Typ</p>
<pre><code class="language-cpp">typedef tVector3d float[3];
</code></pre>
<p>und einen Vektor</p>
<pre><code class="language-cpp">vector&lt;tVector3d&gt; data;
</code></pre>
<p>wenn ich jetzt etwas in der Richtung tue</p>
<pre><code class="language-cpp">tVector3d t;
  ...
  data.push_back(t);
</code></pre>
<p>Bekomme ich vom Compiler diese Meldung:</p>
<blockquote>
<p>C:/Dev-Cpp/include/c++/3.4.2/bits/stl_construct.h: In function `void std::_Construct(_T1*, const _T2&amp;) [with _T1 = float[3], _T2 = float[3&rsqb;&rsqb;':</p>
<p>C:/Dev-Cpp/include/c++/3.4.2/bits/stl_vector.h:560: instantiated from `void std::vector&lt;_Tp, _Alloc&gt;::push_back(const _Tp&amp;) [with _Tp = float[3], _Alloc = std::allocator&lt;float[3]&gt;]'<br />
cmyobj.cpp:25: instantiated from here<br />
C:/Dev-Cpp/include/c++/3.4.2/bits/stl_construct.h:81: error: ISO C++ forbids initialization in array new</p>
</blockquote>
<p>kann mir jemand erklären, warum und wie ich dann trotzdem zu meinem Array komme?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/922561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/922561</guid><dc:creator><![CDATA[DocJunioR]]></dc:creator><pubDate>Sun, 20 Nov 2005 19:40:03 GMT</pubDate></item><item><title><![CDATA[Reply to vector&amp;lt;float[3]&amp;gt; macht Probleme on Sun, 20 Nov 2005 19:38:40 GMT]]></title><description><![CDATA[<p>Ne das ist kein Typ!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/922566</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/922566</guid><dc:creator><![CDATA[hirn]]></dc:creator><pubDate>Sun, 20 Nov 2005 19:38:40 GMT</pubDate></item><item><title><![CDATA[Reply to vector&amp;lt;float[3]&amp;gt; macht Probleme on Sun, 20 Nov 2005 19:43:26 GMT]]></title><description><![CDATA[<p>hmm..<br />
Wenn du das sagst. ist natürlich einleuchtend..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/922570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/922570</guid><dc:creator><![CDATA[DocJunioR]]></dc:creator><pubDate>Sun, 20 Nov 2005 19:43:26 GMT</pubDate></item><item><title><![CDATA[Reply to vector&amp;lt;float[3]&amp;gt; macht Probleme on Sun, 20 Nov 2005 19:45:32 GMT]]></title><description><![CDATA[<p>struct...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/922574</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/922574</guid><dc:creator><![CDATA[class...]]></dc:creator><pubDate>Sun, 20 Nov 2005 19:45:32 GMT</pubDate></item></channel></rss>