<?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[namespace über alles?]]></title><description><![CDATA[<p>Hallo, ich bin es mal wieder^^. Und zwar habe ich vorhin ein Beispiel gesehen, in dem jemand um seine erstellten Klassen und Funktionen und ein namespace gepackt hat. Ist soetwas sinvoll? Sollte man sich z.B einen namespace Demian machen, in dem alles kommt, was ich geschrieben habe? So kann es wenigstens zu keiner überschneidung kommen... Was denkt ihr?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/146405/namespace-über-alles</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Sep 2026 16:35:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/146405.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 07 May 2006 16:34:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 16:34:12 GMT]]></title><description><![CDATA[<p>Hallo, ich bin es mal wieder^^. Und zwar habe ich vorhin ein Beispiel gesehen, in dem jemand um seine erstellten Klassen und Funktionen und ein namespace gepackt hat. Ist soetwas sinvoll? Sollte man sich z.B einen namespace Demian machen, in dem alles kommt, was ich geschrieben habe? So kann es wenigstens zu keiner überschneidung kommen... Was denkt ihr?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1052777</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1052777</guid><dc:creator><![CDATA[MaxDemian]]></dc:creator><pubDate>Sun, 07 May 2006 16:34:12 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 16:36:03 GMT]]></title><description><![CDATA[<p>Also namespaces sind eigentlich nur sinnvoll wenn du Librarys programmierst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1052780</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1052780</guid><dc:creator><![CDATA[Firebyte**Username]]></dc:creator><pubDate>Sun, 07 May 2006 16:36:03 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 16:47:49 GMT]]></title><description><![CDATA[<p>Hmm, aber wenn ich viele Funktionen und Klassen später wiederverwenden will, so ist dass doch eigentlich auch eine libary, oder nicht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1052792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1052792</guid><dc:creator><![CDATA[MaxDemian]]></dc:creator><pubDate>Sun, 07 May 2006 16:47:49 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 17:27:42 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ja dann kann man es ls Library betrachten udn ein umfassender Namespace ist sinnvoll.<br />
Aber der Name des Namespace sollte dann eher die Funktion(en) der Lib repräsentieren, anstatt einfach deinen Namen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1052830</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1052830</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 07 May 2006 17:27:42 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 17:56:15 GMT]]></title><description><![CDATA[<p>Naja, wie die Namespaces heißen müssen, steht ja nirgends. Wenn du deine Namespaces Demian nennen willst, dann mache das doch einfach. Ist ja dein Code! Und das man nur Libs in Namespaces packen soll, ist ja wohl auch weit her geholt. Wo steht das geschrieben? Nameskonflikte können schliesslich nicht nur zwischen Libs entstehen, sondern auch zwischen einem Anwendungscode und einem Librarycode.</p>
<p>Ich packe z.B. alles in Namespaces.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1052853</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1052853</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Sun, 07 May 2006 17:56:15 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 20:27:12 GMT]]></title><description><![CDATA[<p>hmm, hab gerade gemerkt, dass wenn ich std nicht in meinem namespace aufnehme, ich alles per hand zuordnen muss.</p>
<pre><code class="language-cpp">namespace Xnet
{
	using namespace std;
	response testServer(const char *_server, const unsigned short _port,
	const unsigned short _sec);
}
</code></pre>
<p>jetzt hab ich 2 Fragen:<br />
1. Darf ich das mit dem using namepace machen?<br />
2. response ist ein enum, der im selben header definiert ist. Muss dieser in den scope?</p>
<p>Dankeschön <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1052986</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1052986</guid><dc:creator><![CDATA[MaxDemian]]></dc:creator><pubDate>Sun, 07 May 2006 20:27:12 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 20:37:20 GMT]]></title><description><![CDATA[<p>Solange du using namespace NICHT in einer Header-Datei drin hast, ist das völlig i.O. using namespace NUR in cpp-Dateien benutzen!</p>
<p>Wenn response auch in std drin wäre, würde sich der Compiler melden, das er nicht weiß, welches response er nun nehmen soll. Dann müsstest du explizit davor schreiben, welches response du meinst. Was ja auch der Sinn von Namespaces ist... wäre ja sonst witzlos das ganze, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1052998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1052998</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Sun, 07 May 2006 20:37:20 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 21:08:54 GMT]]></title><description><![CDATA[<p>hmm, strange, wenn ich enum in den namespace nehme, erkennt er es in der cpp-datei nicht mehr...<br />
header:</p>
<pre><code class="language-cpp">namespace Rnet
{
	enum response {TRUE,FALSE,ERROR};
	response testServer(const char *_server, const unsigned short _port,
	const unsigned short _sec);
}
</code></pre>
<p>cpp:</p>
<pre><code class="language-cpp">#include &quot;RnetFunc.h&quot;

using namespace std;

response testServer(const char *_server, const unsigned short _port,
const unsigned short _sec)
{
</code></pre>
<p>Und wenn ich vor das response Rnet:: schreibe, so kennzeichnet er ALLES andere als nicht OK...</p>
<p>ist das normal?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1053031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1053031</guid><dc:creator><![CDATA[MaxDemian]]></dc:creator><pubDate>Sun, 07 May 2006 21:08:54 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Sun, 07 May 2006 22:16:47 GMT]]></title><description><![CDATA[<p>Dein Code ist ja auch falsch. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<pre><code class="language-cpp">#include &quot;RnetFunc.h&quot;

using namespace std;

Rnet::response Rnet::testServer(const char *_server, const unsigned short _port,
const unsigned short _sec)
{
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1053048</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1053048</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Sun, 07 May 2006 22:16:47 GMT</pubDate></item><item><title><![CDATA[Reply to namespace über alles? on Mon, 08 May 2006 03:14:01 GMT]]></title><description><![CDATA[<p>Argh (verdammt, bräuchte jetzt ein &quot;Mit-der-Hand-vor-den-Kopf-Schlag-Smiley&quot;)</p>
<p>thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1053063</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1053063</guid><dc:creator><![CDATA[MaxDemian]]></dc:creator><pubDate>Mon, 08 May 2006 03:14:01 GMT</pubDate></item></channel></rss>