<?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[Problem mit Objekten]]></title><description><![CDATA[<p>Hallo,</p>
<p>ist sowas möglich?</p>
<pre><code class="language-cpp">if(w.getID(Location(2,1)) != Ikon('#'))
{
  FC fc(ID('A'), Location(2,1), S);
  ManageFC.push_back(fc);
}
fc.go();
</code></pre>
<p>Wenn ja, wie?<br />
Es kommt immer der Fehler, dass fc ein nict deklarierter Bezeichner ist.<br />
Ist ja auch klar, weil das Objekt erst nach der Abfrage erstellt wird. Kann man das irgendwie umgehn?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/225292/problem-mit-objekten</link><generator>RSS for Node</generator><lastBuildDate>Thu, 01 Oct 2026 16:27:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/225292.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Oct 2008 19:07:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Objekten on Tue, 21 Oct 2008 19:08:03 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ist sowas möglich?</p>
<pre><code class="language-cpp">if(w.getID(Location(2,1)) != Ikon('#'))
{
  FC fc(ID('A'), Location(2,1), S);
  ManageFC.push_back(fc);
}
fc.go();
</code></pre>
<p>Wenn ja, wie?<br />
Es kommt immer der Fehler, dass fc ein nict deklarierter Bezeichner ist.<br />
Ist ja auch klar, weil das Objekt erst nach der Abfrage erstellt wird. Kann man das irgendwie umgehn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602452</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602452</guid><dc:creator><![CDATA[skizZ]]></dc:creator><pubDate>Tue, 21 Oct 2008 19:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Objekten on Tue, 21 Oct 2008 19:11:11 GMT]]></title><description><![CDATA[<p>skizZ schrieb:</p>
<blockquote>
<p>Es kommt immer der Fehler, dass fc ein nict deklarierter Bezeichner ist.<br />
Ist ja auch klar, weil das Objekt erst nach der Abfrage erstellt wird. Kann man das irgendwie umgehn?</p>
</blockquote>
<p>Ja, indem man das Objekt entweder vorher auf dem Stack anlegt (evtl. defaultkonstruiert) oder halt auf dem Heap deklariert, und den Speicher erst im Block belegt.</p>
<p>Übrigens: <code>fc</code> ist nicht ein nichtdeklarierter Bezeichner, weil das Objekt erst nach der Abfrage erstellt wird, sondern weil seine Deklaration in einem anderen (nicht sichtbaren) Gültigkeitsbereich stattgefunden hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602456</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602456</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Tue, 21 Oct 2008 19:11:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Objekten on Tue, 21 Oct 2008 19:19:34 GMT]]></title><description><![CDATA[<p>Danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>und wie genau soll das funktionieren?<br />
Ich muss vor dem Erstellen des Objektes halt etwas Überprüfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602463</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602463</guid><dc:creator><![CDATA[skizZ]]></dc:creator><pubDate>Tue, 21 Oct 2008 19:19:34 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Objekten on Tue, 21 Oct 2008 19:49:38 GMT]]></title><description><![CDATA[<p>So, habe es nun hinbekommen.</p>
<p>Kann man diese auch irgendwie so erstellen, dass man in einer anderne Methode wieder darauf zugriefen kann?</p>
<p>EDIT</p>
<p>hat sich erledigt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602472</guid><dc:creator><![CDATA[skizZ]]></dc:creator><pubDate>Tue, 21 Oct 2008 19:49:38 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Objekten on Tue, 21 Oct 2008 21:19:05 GMT]]></title><description><![CDATA[<p>skizZ schrieb:</p>
<blockquote>
<p>hat sich erledigt.</p>
</blockquote>
<p>Bitte, bitte... sag das du es nicht mit einer globalen Variable gelöst hast...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602528</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602528</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Tue, 21 Oct 2008 21:19:05 GMT</pubDate></item></channel></rss>