<?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[Seltsames Variablennamenprobelm]]></title><description><![CDATA[<p>Ich hab ein etwas selsames Problem mit Code::Blocks C++:<br />
Ich hab di eKLasse Player mit den Attributen dir und gundir.</p>
<p>Wenn ich dir verwende ist es ausserhalb der Klasse immer null.<br />
Es sei denn ich benenne gundir um, dann gehts wieder normal.</p>
<p>Was ist da los? ist das normal?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/308969/seltsames-variablennamenprobelm</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 15:11:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/308969.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Oct 2012 16:12:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 16:12:49 GMT]]></title><description><![CDATA[<p>Ich hab ein etwas selsames Problem mit Code::Blocks C++:<br />
Ich hab di eKLasse Player mit den Attributen dir und gundir.</p>
<p>Wenn ich dir verwende ist es ausserhalb der Klasse immer null.<br />
Es sei denn ich benenne gundir um, dann gehts wieder normal.</p>
<p>Was ist da los? ist das normal?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258916</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258916</guid><dc:creator><![CDATA[alterbro]]></dc:creator><pubDate>Wed, 10 Oct 2012 16:12:49 GMT</pubDate></item><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 16:17:37 GMT]]></title><description><![CDATA[<p>alterbro schrieb:</p>
<blockquote>
<p>Was ist da los? ist das normal?</p>
</blockquote>
<p>Normal wohl nicht, aber mit der Informationsmenge die du hier angibst wird dir auch niemand sagen können ob es ein Compilerfehler ist. Vielleicht machst du auch einfach irgendwas im Code falsch etc. (wovon ich sogar eher ausgehe).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258920</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258920</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Wed, 10 Oct 2012 16:17:37 GMT</pubDate></item><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 16:21:27 GMT]]></title><description><![CDATA[<p>alterbro schrieb:</p>
<blockquote>
<p>Was ist da los? ist das normal?</p>
</blockquote>
<p>keine Ahnung - Glaskugel defekt. Kann sein.</p>
<p>Tipp: wahrscheinlich willst du uns ein minimales kompilierbares Codebeispiel zeigen, das dein Problem verdeutlicht und konkrete Fragen stellen - evtl. mit Angabe der Zeilennummer.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258922</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258922</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Wed, 10 Oct 2012 16:21:27 GMT</pubDate></item><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 16:31:58 GMT]]></title><description><![CDATA[<p>okay, dass ist meine Klasse:</p>
<pre><code class="language-cpp">#ifndef PLAYER_H
#define PLAYER_H
#include &quot;entity.h&quot;
#include &quot;../../../drstd.h&quot;

class player : public entity
{
    public:
        static player*rider;

        int lean;
        int bikedir;

        vector gundir;

        int speed;
        player();
        virtual ~player();
        cube getcube();
        virtual void handle();
        virtual void handlerender();
    protected:
    private:
};

#endif // PLAYER_H
</code></pre>
<p>und das der aufruf:</p>
<pre><code class="language-cpp">camera::ang.y=player::rider-&gt;bikedir*-1;
    printf(&quot;%i\n&quot;,player::rider-&gt;bikedir);
</code></pre>
<p>ich kann keinen Fehler entdecken</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258930</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258930</guid><dc:creator><![CDATA[alterbro]]></dc:creator><pubDate>Wed, 10 Oct 2012 16:31:58 GMT</pubDate></item><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 16:34:54 GMT]]></title><description><![CDATA[<p>alterbro schrieb:</p>
<blockquote>
<p>ich kann keinen Fehler entdecken</p>
</blockquote>
<p>Ich auch nicht, liegt aber daran, dass du uns kein minimales kompilierbares Beispiel geliefert hast (siehe Link in meiner Signatur).<br />
Das Attribut dir, von dem du behauptet hast, es wäre in der Klasse vorhanden, gibts auch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258932</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Wed, 10 Oct 2012 16:34:54 GMT</pubDate></item><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 16:39:41 GMT]]></title><description><![CDATA[<p>alterbro schrieb:</p>
<blockquote>
<p>okay, dass ist meine Klasse:</p>
</blockquote>
<p>Das ist kein compilierbares Minimalbeispiel.</p>
<p>Wobei mir hier schon einiges nicht gefällt:<br />
- wenig aussagekräftige Variablenbenennung.<br />
- &quot;using namespace&quot; gehört niemals in einen Header (und &quot;vector&quot; reicht ohne using namespace nicht aus).<br />
- Membervariablen öffentlich (gerade wenn es sich nicht um eine reine Datenklasse handelt)<br />
...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258934</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Wed, 10 Oct 2012 16:39:41 GMT</pubDate></item><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 16:42:18 GMT]]></title><description><![CDATA[<p>asc schrieb:</p>
<blockquote>
<p>alterbro schrieb:</p>
<blockquote>
<p>okay, dass ist meine Klasse:</p>
</blockquote>
<p>Das ist kein compilierbares Minimalbeispiel.</p>
<p>Wobei mir hier schon einiges nicht gefällt:<br />
- wenig aussagekräftige Variablenbenennung.<br />
- &quot;using namespace&quot; gehört niemals in einen Header (und &quot;vector&quot; reicht ohne using namespace nicht aus).<br />
- Membervariablen öffentlich (gerade wenn es sich nicht um eine reine Datenklasse handelt)<br />
...</p>
</blockquote>
<p>Ok, wird erledigt.</p>
<p>Und es hat sich erledigt, ich hab das File verschoben und das alte nicht richtig gelöscht, sorry, hätte länger nachdenken müssen.<br />
Ich werd mich mal bei meinem Code::Blocks entschuldigen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258936</guid><dc:creator><![CDATA[alterbro]]></dc:creator><pubDate>Wed, 10 Oct 2012 16:42:18 GMT</pubDate></item><item><title><![CDATA[Reply to Seltsames Variablennamenprobelm on Wed, 10 Oct 2012 17:33:57 GMT]]></title><description><![CDATA[<p>asc schrieb:</p>
<blockquote>
<p>und &quot;vector&quot; reicht ohne using namespace nicht aus</p>
</blockquote>
<p>Ich glaube der syntaktisch dramatischere Fehler ist der fehlende Template-Parameter.</p>
<p>alterbro schrieb:</p>
<blockquote>
<p>Ich werd mich mal bei meinem Code::Blocks entschuldigen</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258951</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Wed, 10 Oct 2012 17:33:57 GMT</pubDate></item></channel></rss>