<?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[assign mit verschachtelten datentypen]]></title><description><![CDATA[<p>folgende zuweisung benutze ich in meinem programm um eine matrix mit listen als elementen zu erzeugen:</p>
<p>[/cpp]<br />
rawdata.assign(300,vector&lt;list&lt;int&gt; &gt;(20,0));<br />
[cpp]</p>
<p>bis jetzt ging das auch wunderbar, wenn ich nicht total bekloppt bin. seitdem ich aber opensuse 11 mit gcc-g++ 4.3-39.1 installiert habe kommt beim compilieren die fehlermeldung:</p>
<p>[/code]<br />
/usr/include/c++/4.3/bits/stl_vector.h: In member function ‘void std::vector&lt;_Tp, _Alloc&gt;::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int, _Tp =std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]’:<br />
/usr/include/c++/4.3/bits/stl_vector.h:290: instantiated from ‘std::vector&lt;_Tp, _Alloc&gt;::vector(_InputIterator, _InputIterator, const _Alloc&amp;) [with _InputIterator = int, _Tp = std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]’<br />
sna_afra.cpp:62: instantiated from here<br />
/usr/include/c++/4.3/bits/stl_vector.h:932: error: no matching function for call to ‘std::vector&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt;, std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt; &gt;::_M_fill_initialize(size_t, int&amp;)’<br />
/usr/include/c++/4.3/bits/stl_vector.h:974: note: candidates are: void std::vector&lt;_Tp, _Alloc&gt;::_M_fill_initialize(size_t, const _Tp&amp;) [with _Tp = std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]<br />
[code]</p>
<p>was mich leider völlig überfordert. kann mir jemand helfen?<br />
unter windows hab ich die fehlermeldung auch nicht.</p>
<p>viele grüße<br />
amton</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/218584/assign-mit-verschachtelten-datentypen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 00:32:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/218584.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Jul 2008 16:32:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to assign mit verschachtelten datentypen on Tue, 22 Jul 2008 16:32:00 GMT]]></title><description><![CDATA[<p>folgende zuweisung benutze ich in meinem programm um eine matrix mit listen als elementen zu erzeugen:</p>
<p>[/cpp]<br />
rawdata.assign(300,vector&lt;list&lt;int&gt; &gt;(20,0));<br />
[cpp]</p>
<p>bis jetzt ging das auch wunderbar, wenn ich nicht total bekloppt bin. seitdem ich aber opensuse 11 mit gcc-g++ 4.3-39.1 installiert habe kommt beim compilieren die fehlermeldung:</p>
<p>[/code]<br />
/usr/include/c++/4.3/bits/stl_vector.h: In member function ‘void std::vector&lt;_Tp, _Alloc&gt;::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int, _Tp =std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]’:<br />
/usr/include/c++/4.3/bits/stl_vector.h:290: instantiated from ‘std::vector&lt;_Tp, _Alloc&gt;::vector(_InputIterator, _InputIterator, const _Alloc&amp;) [with _InputIterator = int, _Tp = std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]’<br />
sna_afra.cpp:62: instantiated from here<br />
/usr/include/c++/4.3/bits/stl_vector.h:932: error: no matching function for call to ‘std::vector&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt;, std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt; &gt;::_M_fill_initialize(size_t, int&amp;)’<br />
/usr/include/c++/4.3/bits/stl_vector.h:974: note: candidates are: void std::vector&lt;_Tp, _Alloc&gt;::_M_fill_initialize(size_t, const _Tp&amp;) [with _Tp = std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]<br />
[code]</p>
<p>was mich leider völlig überfordert. kann mir jemand helfen?<br />
unter windows hab ich die fehlermeldung auch nicht.</p>
<p>viele grüße<br />
amton</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1551817</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1551817</guid><dc:creator><![CDATA[anton12]]></dc:creator><pubDate>Tue, 22 Jul 2008 16:32:00 GMT</pubDate></item><item><title><![CDATA[Reply to assign mit verschachtelten datentypen on Tue, 22 Jul 2008 20:32:38 GMT]]></title><description><![CDATA[<p>Zeig mal konkreten Code. Vor allem, was rawdata ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1551986</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1551986</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Tue, 22 Jul 2008 20:32:38 GMT</pubDate></item><item><title><![CDATA[Reply to assign mit verschachtelten datentypen on Wed, 23 Jul 2008 10:41:16 GMT]]></title><description><![CDATA[<p>hallo drakon,</p>
<p>hier ist das entsprechende restprogramm:</p>
<pre><code class="language-cpp">#include&lt;vector&gt;
#include&lt;list&gt;

using namespace std;

vector&lt;vector&lt;list&lt;int&gt; &gt; &gt; adjacency;

int main(int argc, char *argv[])
{
  adjacency.assign(300,vector&lt;list&lt;int&gt; &gt;(20,0));
}
</code></pre>
<p>an der fehlermeldung ändert sich nichts:</p>
<pre><code>/usr/include/c++/4.3/bits/stl_vector.h: In member function ‘void std::vector&lt;_Tp, _Alloc&gt;::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int, _Tp = std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt;&gt;]’:
/usr/include/c++/4.3/bits/stl_vector.h:290:   instantiated from ‘std::vector&lt;_Tp, _Alloc&gt;::vector(_InputIterator, _InputIterator, const _Alloc&amp;) [with _InputIterator = int, _Tp = std::list&lt;int, std::allocator&lt;int&gt; &gt;, _Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]’
vectorerror.cpp:10:   instantiated from here
/usr/include/c++/4.3/bits/stl_vector.h:932: error: no matching function for call to ‘std::vector&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt;, std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt; &gt;::_M_fill_initialize(size_t, int&amp;)’
/usr/include/c++/4.3/bits/stl_vector.h:974: note: candidates are: void std::vector&lt;_Tp, _Alloc&gt;::_M_fill_initialize(size_t, const _Tp&amp;) [with _Tp = std::list&lt;int, std::allocator&lt;int&gt; &gt;,_Alloc = std::allocator&lt;std::list&lt;int, std::allocator&lt;int&gt; &gt; &gt;]
</code></pre>
<p>danke für deine hilfe!</p>
<p>Anton</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552292</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552292</guid><dc:creator><![CDATA[anton12]]></dc:creator><pubDate>Wed, 23 Jul 2008 10:41:16 GMT</pubDate></item><item><title><![CDATA[Reply to assign mit verschachtelten datentypen on Wed, 23 Jul 2008 11:50:08 GMT]]></title><description><![CDATA[<p>Es muss ja auch heißen</p>
<pre><code class="language-cpp">adjacency.assign(300,list&lt;int&gt;(20,0));
</code></pre>
<p>immerhin willst du einen vector mit list-Instanzen füllen.<br />
[edit]Sorry, Hab mich verlesen. Siehe campers Post.<br />
also so</p>
<pre><code class="language-cpp">adjacency.assign(300,vector&lt;list&lt;int&gt; &gt;(20));
</code></pre>
<p>[edit]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552304</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552304</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 23 Jul 2008 11:50:08 GMT</pubDate></item><item><title><![CDATA[Reply to assign mit verschachtelten datentypen on Wed, 23 Jul 2008 11:42:29 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">vector&lt;list&lt;int&gt; &gt;(20,0)
</code></pre>
<p>Was soll der zweite Parameter 0 bewirken? Wenn ich das richtig sehe, rufst du so den Iterator-Konstruktor von vector auf; und einfache Integer sind natürlich keine Iteratoren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552326</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552326</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 23 Jul 2008 11:42:29 GMT</pubDate></item><item><title><![CDATA[Reply to assign mit verschachtelten datentypen on Thu, 24 Jul 2008 07:49:06 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>vielen dank, jetzt klappt es. wahrscheinlich war die alte compiler version einfach nicht so streng ;).</p>
<p>anton</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552803</guid><dc:creator><![CDATA[anton12]]></dc:creator><pubDate>Thu, 24 Jul 2008 07:49:06 GMT</pubDate></item></channel></rss>