<?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[deque]]></title><description><![CDATA[<p>Huhuuu ,<br />
folgendes Prob</p>
<pre><code>struct waitingPixel {
		int x, y; 
	} p;
int x, y; 
std::deque &lt;waitingPixel&gt; fifoStack(); 
 p.x = x0; 
 p.y = y0; 

fifoStack.push_back(p);
</code></pre>
<p>Wenn ich den push_back aufrufe kommt immer das die Eingabe vom falschen Typ ist?<br />
Was mach ich denn falsch?</p>
<p>muss die Deklaration irgendwie so aussehen:<br />
std::deque &lt;waitingPixel&gt; fifoStack(x,y); ???</p>
<p>komm damit nicht so richtig klar:) .. kann mir einer helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/269127/deque</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 08:55:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/269127.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 19 Jun 2010 14:08:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:08:10 GMT]]></title><description><![CDATA[<p>Huhuuu ,<br />
folgendes Prob</p>
<pre><code>struct waitingPixel {
		int x, y; 
	} p;
int x, y; 
std::deque &lt;waitingPixel&gt; fifoStack(); 
 p.x = x0; 
 p.y = y0; 

fifoStack.push_back(p);
</code></pre>
<p>Wenn ich den push_back aufrufe kommt immer das die Eingabe vom falschen Typ ist?<br />
Was mach ich denn falsch?</p>
<p>muss die Deklaration irgendwie so aussehen:<br />
std::deque &lt;waitingPixel&gt; fifoStack(x,y); ???</p>
<p>komm damit nicht so richtig klar:) .. kann mir einer helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914753</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914753</guid><dc:creator><![CDATA[nicht registrierter pätti]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:08:10 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:15:17 GMT]]></title><description><![CDATA[<p>poste mal ein anständiges Code-Beispiel mit Drumherum. Da sieht man ja gar nicht, was wo definiert/deklariert ist.</p>
<p>und</p>
<pre><code>typ name();
</code></pre>
<p>deklariert eine Funktion und definiert kein Objekt. Siehe <a href="http://www.google.com/search?q=most+vexing+parse" rel="nofollow">most vexing parse</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914759</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:15:17 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:16:00 GMT]]></title><description><![CDATA[<p>hab ich schon mal gesagt, dass keiner lokale funktionsdeklarationen braucht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914760</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914760</guid><dc:creator><![CDATA[bekannterscheiß]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:26:22 GMT]]></title><description><![CDATA[<p>da gehört sonst kein code dazu,</p>
<p>aufgabe ist es einen container zu erstellen der in jedem eintrag zwei elemente speichert nach der form</p>
<p>fifostack[1] = {x1,y1}<br />
fifostack[2] = {x2,y2}<br />
usw.</p>
<p>dazu hab ich mir überlegt wenn ich mir eine structur mit zwei elementen festlege und den container(also deque) darauf caste(deque &lt;waitingPixel&gt;), dann sollte ich 2 elementige elemente in meinen container reinwerfen können xD</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914764</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914764</guid><dc:creator><![CDATA[nicht registrierter pätti]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:26:22 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:30:46 GMT]]></title><description><![CDATA[<p>ok code könnte so aussehen:</p>
<pre><code>struct waitingPixel {
        int x, y;
                    } p;

int x1=5, y1=6, x2=8, y2=10;
std::deque &lt;waitingPixel&gt; fifoStack();
 p.x = x1;
 p.y = y1;
fifoStack.push_back(p);
 p.x = x2;
 p.y = y2;
fifoStack.push_back(p);
</code></pre>
<p>nun sollte in fifoStack drinne stehen:</p>
<p>fifoStack[1]={5,6}<br />
fifoStack[2]={8,10}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914767</guid><dc:creator><![CDATA[nicht registrierter pätti]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:30:46 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:32:17 GMT]]></title><description><![CDATA[<p>beim debuggen steht aber an jeder stelle nur</p>
<p>fifoStack = {???,???}</p>
<p>was hab ich denn falsch gemacht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914769</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914769</guid><dc:creator><![CDATA[nicht registrierter pätti]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:32:17 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:38:11 GMT]]></title><description><![CDATA[<p>Bei mir kompiliert das nicht. Statements gehören in eine Funktion rein. Wie gesagt: Lass das Drumherum nicht einfach weg!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914774</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:38:11 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:57:03 GMT]]></title><description><![CDATA[<p>der rest code bringt doch garnix .. ist doch einfach nur eine definition .. nur das ich die wahrscheinlich falsch gemacht habe</p>
<p>um deque aufrufen zu können musst du natürlich noch #include &lt;deque&gt; oben hinschreiben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914786</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914786</guid><dc:creator><![CDATA[nicht registrierter pätti]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:57:03 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 14:58:56 GMT]]></title><description><![CDATA[<pre><code>#include &lt;deque&gt;

int main(int argc, char **argv)
{

struct waitingPixel {
        int x, y;
                    } p;

int x1=5, y1=6, x2=8, y2=10;
std::deque &lt;waitingPixel&gt; fifoStack;

 p.x = x1;
 p.y = y1;
fifoStack.push_back(p);
 p.x = x2;
 p.y = y2;
fifoStack.push_back(p);

	return 0;	
}
</code></pre>
<p>hier is dein bsp<br />
also noch mal frage .. warum stehen in fifoStack keine werte(nur mit debugger zu sehen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914789</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914789</guid><dc:creator><![CDATA[nicht registrierter pätti]]></dc:creator><pubDate>Sat, 19 Jun 2010 14:58:56 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sat, 19 Jun 2010 15:33:08 GMT]]></title><description><![CDATA[<p>Das kompiliert immer noch nicht. <code>waitingPixel</code> ist ein lokaler Typ und darf als solcher nicht als Template-Argument verwendet werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1914807</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1914807</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sat, 19 Jun 2010 15:33:08 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sun, 20 Jun 2010 13:13:08 GMT]]></title><description><![CDATA[<p>kein plan warum das bei dir nicht kompiliert. jedenfalls geht alles so wie gewollt im debugger werden zwar immer noch nicht die richtigen werte angezeigt viel. kann mir einer erklären warum. aber dieses bsp sollte bei dir auch funzen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>[code]#include &lt;deque&gt;<br />
#include &lt;iostream&gt;</p>
<p>int main(int argc, char **argv)<br />
{</p>
<p>struct waitingPixel {<br />
int x, y;<br />
} p;</p>
<p>std::deque&lt;waitingPixel&gt; intes;<br />
p.x=1;<br />
p.y=2;</p>
<p>intes.push_back(p);<br />
int s = intes.front().x;<br />
int k = intes.back().y;<br />
std::cout&lt;&lt; s &lt;&lt;&quot; &quot; &lt;&lt;k &lt;&lt; std::endl;</p>
<p>p.x=20;<br />
p.y=23;</p>
<p>intes.push_back(p);</p>
<p>s = intes.back().x;<br />
k = intes.back().y;<br />
std::cout&lt;&lt; s &lt;&lt;&quot; &quot; &lt;&lt; k &lt;&lt; std::endl;<br />
return 0;<br />
}[code]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1915083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1915083</guid><dc:creator><![CDATA[nicht registrierter pätti]]></dc:creator><pubDate>Sun, 20 Jun 2010 13:13:08 GMT</pubDate></item><item><title><![CDATA[Reply to deque on Sun, 20 Jun 2010 13:31:53 GMT]]></title><description><![CDATA[<p>nicht registrierter pätti schrieb:</p>
<blockquote>
<p>kein plan warum das bei dir nicht kompiliert. [...] aber dieses bsp sollte bei dir auch funzen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Habe ich doch gesagt. Dein Programmtext ist kein gültiges C++. Dein Compiler mag gnädig genug sein und darüber hinweg sehen. Meiner ist es nicht.</p>
<p>nicht registrierter pätti schrieb:</p>
<blockquote>
<p>im debugger werden zwar immer noch nicht die richtigen werte angezeigt viel. kann mir einer erklären warum.</p>
</blockquote>
<p>Du kannst ja mal probieren, ob der Debugger Dir etwas vernünftiges anzeigt, wenn Du Deinem Compiler ein korrektes C++ Programm vorwirfst. Ich kann mir vorstellen, dass beim Microsoft-Debugger die Visualisierung einer STL-Datenstruktur Probleme macht, wenn als Typparameter ein <em>lokales</em> struct verwendet wird. Das ist nämlich, wie gesagt, in C++ nicht erlaubt. Dass es bei Dir kompiliert ist kein Beweis für ein legales C++ Programm. Mit diesem Debugger-Problem bist Du eigentlich hier auch falsch. Hier geht es um die Sprache C++ und nicht um ein Microsoft-Programm.</p>
<p>kk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1915095</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1915095</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sun, 20 Jun 2010 13:31:53 GMT</pubDate></item></channel></rss>