<?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[Globale Variable?]]></title><description><![CDATA[<p>Hallo,</p>
<p>Folgende Frage:<br />
Gilt diese COMMAND Variable aus diesem Codebeispiel als Globale Variable?</p>
<p>Headerdatei</p>
<pre><code class="language-cpp">class TestKlasse
{
  public:
    void foo();
  private:
    static std::string const COMMAND;

}
</code></pre>
<p>cpp - File</p>
<pre><code class="language-cpp">string const TestKlasse::COMMAND = &quot;quit&quot;;

  void TestKlasse::foo()
  {
  }
</code></pre>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/249423/globale-variable</link><generator>RSS for Node</generator><lastBuildDate>Wed, 16 Sep 2026 13:53:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/249423.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Sep 2009 14:27:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Globale Variable? on Mon, 07 Sep 2009 14:27:15 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Folgende Frage:<br />
Gilt diese COMMAND Variable aus diesem Codebeispiel als Globale Variable?</p>
<p>Headerdatei</p>
<pre><code class="language-cpp">class TestKlasse
{
  public:
    void foo();
  private:
    static std::string const COMMAND;

}
</code></pre>
<p>cpp - File</p>
<pre><code class="language-cpp">string const TestKlasse::COMMAND = &quot;quit&quot;;

  void TestKlasse::foo()
  {
  }
</code></pre>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1773884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1773884</guid><dc:creator><![CDATA[global_]]></dc:creator><pubDate>Mon, 07 Sep 2009 14:27:15 GMT</pubDate></item><item><title><![CDATA[Reply to Globale Variable? on Mon, 07 Sep 2009 14:30:31 GMT]]></title><description><![CDATA[<p>Nein. Diese Variable ist eine Klassenvariable deiner Testklasse und da sie static ist, nur innerhalb dieser Klasse sichtbar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1773889</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1773889</guid><dc:creator><![CDATA[Tolpan]]></dc:creator><pubDate>Mon, 07 Sep 2009 14:30:31 GMT</pubDate></item><item><title><![CDATA[Reply to Globale Variable? on Mon, 07 Sep 2009 14:47:37 GMT]]></title><description><![CDATA[<p>Ganz einfach: alles, was außerhalb irgendeines Scopes (Funktion, Klasse...) ist, ist global. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1773901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1773901</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Mon, 07 Sep 2009 14:47:37 GMT</pubDate></item><item><title><![CDATA[Reply to Globale Variable? on Mon, 07 Sep 2009 14:49:15 GMT]]></title><description><![CDATA[<p>ok thx!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1773903</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1773903</guid><dc:creator><![CDATA[global_]]></dc:creator><pubDate>Mon, 07 Sep 2009 14:49:15 GMT</pubDate></item><item><title><![CDATA[Reply to Globale Variable? on Mon, 07 Sep 2009 16:13:30 GMT]]></title><description><![CDATA[<p>Tolpan schrieb:</p>
<blockquote>
<p>Nein. Diese Variable ist eine Klassenvariable deiner Testklasse und da sie static ist, nur innerhalb dieser Klasse sichtbar.</p>
</blockquote>
<p>Was natürlich nicht stimmt. Sie ist nur innerhalb der Klasse sichtbar, weil sie <em>private</em> ist. static hat in dem Fall mit Sichtbarkeit nichts zu tun.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1773969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1773969</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Mon, 07 Sep 2009 16:13:30 GMT</pubDate></item><item><title><![CDATA[Reply to Globale Variable? on Mon, 07 Sep 2009 17:27:30 GMT]]></title><description><![CDATA[<p>pumuckl schrieb:</p>
<blockquote>
<p>Tolpan schrieb:</p>
<blockquote>
<p>Nein. Diese Variable ist eine Klassenvariable deiner Testklasse und da sie static ist, nur innerhalb dieser Klasse sichtbar.</p>
</blockquote>
<p>Was natürlich nicht stimmt. Sie ist nur innerhalb der Klasse sichtbar, weil sie <em>private</em> ist. static hat in dem Fall mit Sichtbarkeit nichts zu tun.</p>
</blockquote>
<p>Natürlich. Tippfehler sry.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1774014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1774014</guid><dc:creator><![CDATA[Tolpan]]></dc:creator><pubDate>Mon, 07 Sep 2009 17:27:30 GMT</pubDate></item><item><title><![CDATA[Reply to Globale Variable? on Mon, 07 Sep 2009 18:10:41 GMT]]></title><description><![CDATA[<p>Tolpan schrieb:</p>
<blockquote>
<p>Natürlich. Tippfehler sry.</p>
</blockquote>
<p>Rofl, unwissenheit trifft´s eher...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1774053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1774053</guid><dc:creator><![CDATA[ROFLKARTOFFEL!]]></dc:creator><pubDate>Mon, 07 Sep 2009 18:10:41 GMT</pubDate></item></channel></rss>