<?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[Singleton]]></title><description><![CDATA[<p>Ist eine reine statische Klasse auch ein Singleton?</p>
<p>Also sowas</p>
<pre><code class="language-cpp">class Singleton
{
public:
    static void DoThat() ;
    static void DoThis() ;
private:
    static int blub ;
};
</code></pre>
<p>Danke für eure Antworten!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/264055/singleton</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 10:33:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/264055.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Mar 2010 23:23:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Singleton on Wed, 31 Mar 2010 23:23:55 GMT]]></title><description><![CDATA[<p>Ist eine reine statische Klasse auch ein Singleton?</p>
<p>Also sowas</p>
<pre><code class="language-cpp">class Singleton
{
public:
    static void DoThat() ;
    static void DoThis() ;
private:
    static int blub ;
};
</code></pre>
<p>Danke für eure Antworten!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876217</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876217</guid><dc:creator><![CDATA[Nummer 1921]]></dc:creator><pubDate>Wed, 31 Mar 2010 23:23:55 GMT</pubDate></item><item><title><![CDATA[Reply to Singleton on Wed, 31 Mar 2010 23:46:01 GMT]]></title><description><![CDATA[<p>Es gibt keine &quot;rein statischen&quot; Klassen da jede Klasse einen Konstruktor hat, entweder von dir geschrieben oder vom Compiler erzeugt, und Konstruktoren können nicht static sein. Von daher ist die Frage schon hinfällig.<br />
Dein Beispiel ist jedenfalls kein Singleton:</p>
<pre><code class="language-cpp">class Singleton
{
public:
    static void DoThat() ;
    static void DoThis() ;
private:
    static int blub ;
};

int main()
{
	Singleton s1;
	Singleton s2;

	return 0;
}
</code></pre>
<p>Der Compiler erstellt hier den Konstruktor für dich und setzt ihn auf public, ergo kein Singleton.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876220</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876220</guid><dc:creator><![CDATA[rean]]></dc:creator><pubDate>Wed, 31 Mar 2010 23:46:01 GMT</pubDate></item><item><title><![CDATA[Reply to Singleton on Thu, 01 Apr 2010 00:03:07 GMT]]></title><description><![CDATA[<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1876221</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1876221</guid><dc:creator><![CDATA[Nummer 1921]]></dc:creator><pubDate>Thu, 01 Apr 2010 00:03:07 GMT</pubDate></item></channel></rss>