<?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[Was soll das nu&#x27; wieder (verschachtelte namespaces)]]></title><description><![CDATA[<p>Mein VC++ 6 Compiler hat irgendwie große Probleme mit verschachtelten namespaces...</p>
<ol>
<li></li>
</ol>
<p>Ich hatte eine template Funktion. Mit verschiedenen Typen hab ich die Funktion aus einer anderen Funktion, die sich in einem verschachtelten namespace befand aufgerufen. Der Linker schimpfte dann über unaufgelöste Symbole. Irgendwie hab ich dann in der main() Funktion die Templatefunktion mit dem Typ int aufgerufen und die Fehlerzahl hat sich um 1 reduziert, schließlich wurde das Problem durch diese Zeilen gelöst, die direkt am Anfang nach main() stehen</p>
<pre><code class="language-cpp">//???
   ValToHex((int) 0, 0,&quot;&quot;);
   ValToHex((unsigned short) 0, 0, &quot;&quot;);
   ValToHex((unsigned char) 0, 0, &quot;&quot;);
   ValToHex((short) 0, 0, &quot;&quot;);
</code></pre>
<p>Keine Ahnung, was das soll, das kann doch nicht normal sein?!</p>
<ol start="2">
<li></li>
</ol>
<p>Nun treten die nächsten Probleme auf, die mir ehrlich gesagt langsam die Lust am programmieren nehmen... Man sucht Tag für Tag nach irgendeinem seltsamen Fehler, den man wahrscheinlich nicht einmal selbst verursacht hat:<br />
Es gibt folgende namespaces:<br />
Dbg::Win<br />
Dbg::Gtk<br />
Ev::Win<br />
Ev::Gtk<br />
Der Compiler behauptet in folgendem Wortlaut: &quot;'Gtk' : is not a member of 'Ev'&quot;<br />
wo ich doch gerade dabei bin, herauszufinden, warum die GTK+ Funktionen trotz eingebundener GTK+ Headerdateien, vom Compiler herablassend als &quot;undeclared identifiers&quot; bezeichnet werden............ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/158116/was-soll-das-nu-wieder-verschachtelte-namespaces</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 03:38:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/158116.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Sep 2006 14:41:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Fri, 01 Sep 2006 14:41:14 GMT]]></title><description><![CDATA[<p>Mein VC++ 6 Compiler hat irgendwie große Probleme mit verschachtelten namespaces...</p>
<ol>
<li></li>
</ol>
<p>Ich hatte eine template Funktion. Mit verschiedenen Typen hab ich die Funktion aus einer anderen Funktion, die sich in einem verschachtelten namespace befand aufgerufen. Der Linker schimpfte dann über unaufgelöste Symbole. Irgendwie hab ich dann in der main() Funktion die Templatefunktion mit dem Typ int aufgerufen und die Fehlerzahl hat sich um 1 reduziert, schließlich wurde das Problem durch diese Zeilen gelöst, die direkt am Anfang nach main() stehen</p>
<pre><code class="language-cpp">//???
   ValToHex((int) 0, 0,&quot;&quot;);
   ValToHex((unsigned short) 0, 0, &quot;&quot;);
   ValToHex((unsigned char) 0, 0, &quot;&quot;);
   ValToHex((short) 0, 0, &quot;&quot;);
</code></pre>
<p>Keine Ahnung, was das soll, das kann doch nicht normal sein?!</p>
<ol start="2">
<li></li>
</ol>
<p>Nun treten die nächsten Probleme auf, die mir ehrlich gesagt langsam die Lust am programmieren nehmen... Man sucht Tag für Tag nach irgendeinem seltsamen Fehler, den man wahrscheinlich nicht einmal selbst verursacht hat:<br />
Es gibt folgende namespaces:<br />
Dbg::Win<br />
Dbg::Gtk<br />
Ev::Win<br />
Ev::Gtk<br />
Der Compiler behauptet in folgendem Wortlaut: &quot;'Gtk' : is not a member of 'Ev'&quot;<br />
wo ich doch gerade dabei bin, herauszufinden, warum die GTK+ Funktionen trotz eingebundener GTK+ Headerdateien, vom Compiler herablassend als &quot;undeclared identifiers&quot; bezeichnet werden............ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1129220</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1129220</guid><dc:creator><![CDATA[MaximumAccessViolation]]></dc:creator><pubDate>Fri, 01 Sep 2006 14:41:14 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Fri, 01 Sep 2006 14:44:34 GMT]]></title><description><![CDATA[<p>Na, die Probleme werden schon durch Dich verursacht sein.<br />
z.B. falsche abhängigkeiten der Header.</p>
<pre><code class="language-cpp">a.h

#include &quot;b.h&quot;
namespace A
{

};

b.h

#include &quot;a.h&quot;
namespace B
{
  A::irgendwas
}
</code></pre>
<p>Damit wird in b.h z.B. der Fehler auftauchen,d as es keinen Namespace A gibt.</p>
<p>Ohne Quellcode lässt sich zu Deinem Problem nichts sagen - bzw. wo war da noch mal die Frage ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1129222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1129222</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Fri, 01 Sep 2006 14:44:34 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Fri, 01 Sep 2006 14:50:16 GMT]]></title><description><![CDATA[<p>Der VC6 wird von so gut wie keiner Lib mehr unterstützt... Schmeiss ihn weg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1129227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1129227</guid><dc:creator><![CDATA[Thomas ** 0]]></dc:creator><pubDate>Fri, 01 Sep 2006 14:50:16 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Sun, 03 Sep 2006 12:00:31 GMT]]></title><description><![CDATA[<p>events_win.cpp</p>
<pre><code class="language-cpp">#include &quot;main.h&quot;

namespace Ev {
	namespace WinCon {
		inline void Init() {
		}

      inline void HandleKeyPress() {
      }
	}
}
</code></pre>
<p>events_win.h</p>
<pre><code class="language-cpp">#if !defined(EVENTS_WIN)
#define EVENTS_WIN

namespace Ev {
   namespace WinCon {
      extern inline void Init();
      extern inline void HandleKeyPress();
   }
}

#endif //EVENTS_WIN
</code></pre>
<p>events_gtk.cpp</p>
<pre><code class="language-cpp">#include &quot;main.h&quot;

namespace Ev {
   namespace Gtk {
      inline void Init() {
         g_signal_connect(G_OBJECT(gtk_window_new(GTK_WINDOW_TOPLEVEL)), &quot;key_press_event&quot;,
            G_CALLBACK(&quot;KeyPress&quot;));
      }

      inline void HandleKeyPress() {
      }

      static gboolean KeyPress(GtkWidget *widget, GdkEventKey *event, gpointer data) {
         Cpu::Exec();
      }
   }
}
</code></pre>
<p>events_gtk.h</p>
<pre><code class="language-cpp">#if !defined(EVENTS_GTK)
#define EVENTS_GTK

#include &lt;GTK/GTK.h&gt;

namespace Ev {
   namespace Gtk {
      extern inline void Init();
      extern inline void HandleKeyPress();
      static gboolean KeyPress(GtkWidget *widget, GdkEventKey *event, gpointer data);
   }
}

#endif //EVENTS_GTK
</code></pre>
<p>events.cpp</p>
<pre><code class="language-cpp">#include &quot;main.h&quot;

namespace Ev {
	inline void Init() {
		#if defined(EVENTS_WIN)
         Ev::WinCon::Init();
      #elif defined(EVENTS_GTK)
         Ev::Gtk::Init();
      #endif
	}

   inline void HandleKeyPress() {
		#if defined(EVENTS_WIN)
         Ev::WinCon::HandleKeyPress();
      #elif defined(EVENTS_GTK)
         Ev::Gtk::HandleKeyPress();
      #endif
   }
}
</code></pre>
<p>events.h</p>
<pre><code class="language-cpp">#if !defined(EVENTS_H)
#define EVENTS_H

//#define EVENTS_WIN
#define EVENTS_GTK

#if defined(EVENTS_WIN)
   #include &quot;events_win.h&quot;
#elif defined(EVENTS_GTK)
   #include &quot;events_gtk.h&quot;
#endif

namespace Ev {
   extern inline void Init();

   /* these handle functions are not needed using interfaces with automatic event callback */
   extern inline void HandleKeyPress();
}

#endif //EVENTS_H
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1130134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1130134</guid><dc:creator><![CDATA[MaximumAccessViolation]]></dc:creator><pubDate>Sun, 03 Sep 2006 12:00:31 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Sun, 03 Sep 2006 13:43:06 GMT]]></title><description><![CDATA[<p>VC++ 6.0 ist wirklich nicht mehr zu gebrauchen. Der erzeugt teilweise wirklich Fehler, die man nicht gemacht hat. Zum Beispiel findet er plötzlich eine Inklude nicht mehr oder sonst was total merkwürdiges.</p>
<p><a href="http://msdn.microsoft.com/vstudio/express/visualc/download/" rel="nofollow">http://msdn.microsoft.com/vstudio/express/visualc/download/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1130174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1130174</guid><dc:creator><![CDATA[Express]]></dc:creator><pubDate>Sun, 03 Sep 2006 13:43:06 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Sun, 03 Sep 2006 13:54:51 GMT]]></title><description><![CDATA[<p>Vergiss es mit Express... ich habs schon mal versucht... Das kann man doch echt vergessen! Ich habs wegen irgendwelchen Fehlern nicht zum laufen gebracht... dieser Fehler treten nur in der Express Edition auf und das Problem konnte von keinem der es auch hatte gelöst werden, was es genau war, weiß ich nicht mehr...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1130181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1130181</guid><dc:creator><![CDATA[MaximumAccessViolation]]></dc:creator><pubDate>Sun, 03 Sep 2006 13:54:51 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Sun, 03 Sep 2006 13:58:14 GMT]]></title><description><![CDATA[<p>Hab noch nie beschwerden diesbezüglich gehört! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1130182</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1130182</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Sun, 03 Sep 2006 13:58:14 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Mon, 04 Sep 2006 17:46:09 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;

void main() {
   cout &lt;&lt; &quot;hallo welt&quot; &lt;&lt; endl;
}
</code></pre>
<pre><code>'cout': undeclared identifier
'endl': undeclared identifier
</code></pre>
<p>also es funktioniert auch bei dieser installation mal wieder nicht............</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1130985</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1130985</guid><dc:creator><![CDATA[MaximumAccessViolation]]></dc:creator><pubDate>Mon, 04 Sep 2006 17:46:09 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Mon, 04 Sep 2006 17:55:46 GMT]]></title><description><![CDATA[<p>Doch, es tut genau das was es soll. cout und endl befinden sich nämlich seit dem '98er Standard im Namespace std.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

void main() { // BTW: es heisst auch MINDESTENS seit dem '98er Standard int main
   cout &lt;&lt; &quot;hallo welt&quot; &lt;&lt; endl;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1131003</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131003</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Mon, 04 Sep 2006 17:55:46 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Mon, 04 Sep 2006 18:28:18 GMT]]></title><description><![CDATA[<p>MaximumAccessViolation schrieb:</p>
<blockquote>
<p>also es funktioniert auch bei dieser installation mal wieder nicht............</p>
</blockquote>
<p>Für gewöhnlich sitzt das Problem nicht im sondern vorm Computer!</p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 

int main() { 
   std::cout &lt;&lt; &quot;hallo welt&quot; &lt;&lt; std::endl; // im Namespace std!!!!!!!!!!
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1131029</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131029</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Mon, 04 Sep 2006 18:28:18 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Mon, 04 Sep 2006 18:29:40 GMT]]></title><description><![CDATA[<p>Ihr habt doch alle keine Ahnung. <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="😃"
    /> Es heißt int main.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131030</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131030</guid><dc:creator><![CDATA[void_main]]></dc:creator><pubDate>Mon, 04 Sep 2006 18:29:40 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Tue, 05 Sep 2006 15:38:00 GMT]]></title><description><![CDATA[<p>Nun ja... das ist das Problem IM Computer... So hab ich nicht C++ gelernt... Ich hab in VC++ 6 noch nie Std mit angegeben...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131647</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131647</guid><dc:creator><![CDATA[MaximumAccessViolation]]></dc:creator><pubDate>Tue, 05 Sep 2006 15:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Tue, 05 Sep 2006 16:41:21 GMT]]></title><description><![CDATA[<p>Das hier:</p>
<p>MaximumAccessViolation schrieb:</p>
<blockquote>
<p>Nun ja... das ist das Problem IM Computer...</p>
</blockquote>
<p>widerspricht dem hier:</p>
<p>MaximumAccessViolation schrieb:</p>
<blockquote>
<p>So hab ich nicht C++ gelernt...</p>
</blockquote>
<p>ziemlich. Oder ist der Computer daran schuld, dass Du etwas falsches gelernt hast?</p>
<p>Und dass VC6 das kann ist auch kein Argument, da dieser Compiler ja nun ziemlich veraltet ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131699</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131699</guid><dc:creator><![CDATA[Konrad Rudolph]]></dc:creator><pubDate>Tue, 05 Sep 2006 16:41:21 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Tue, 05 Sep 2006 19:08:49 GMT]]></title><description><![CDATA[<p>Ich sag nur '98er Standard. Alles andere ist nicht (mehr) C++.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131806</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Tue, 05 Sep 2006 19:08:49 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Tue, 05 Sep 2006 21:43:10 GMT]]></title><description><![CDATA[<p>MaximumAccessViolation schrieb:</p>
<blockquote>
<p>Nun ja... das ist das Problem IM Computer... So hab ich nicht C++ gelernt... Ich hab in VC++ 6 noch nie Std mit angegeben...</p>
</blockquote>
<p>Dann hast du kein ISO-C++ gelernt und VC++6 kam in dem Jahr raus, in dem erst vom ISO-Komitee ISO-C++ verabschiedet wurde. VC++6 ist also nicht ISO-konform. Und ISO ist nunmal internationaler Standard. Und an den halten sich neuere Compiler (zum Glück) weitestgehend.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1131900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1131900</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Tue, 05 Sep 2006 21:43:10 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Wed, 06 Sep 2006 19:03:48 GMT]]></title><description><![CDATA[<p>Ich hab nie behauptet, dass ich ISO C++ gelernt hab... hab auch noch nie ein tut gesehen, in dem std:: mit angegeben war... egal... std:: nervt irgendwie, soll ich etz meinen kompletten Code nach allen Funktionen, bei denen std:: fehlt durchsuchen? using namespace funktioniert ja nur in der Funktion ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1132592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1132592</guid><dc:creator><![CDATA[MaximumAccessViolation]]></dc:creator><pubDate>Wed, 06 Sep 2006 19:03:48 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Wed, 06 Sep 2006 19:39:50 GMT]]></title><description><![CDATA[<p>using namespace wird doch über den gesammten Bereich aufgelöst. Es muss halt in jeder Unit in der es gebraucht wird angegeben werden.</p>
<p>Etwas quick und dirty wäre es, das in die stdafx.h zu nehmen - sei jedoch gewarnt das sowas eigentlich keine gute Idee ist.</p>
<p>Was genau meinst Du mit &quot;Funktioniert nur in der Funktion...&quot; ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1132610</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1132610</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Wed, 06 Sep 2006 19:39:50 GMT</pubDate></item><item><title><![CDATA[Reply to Was soll das nu&#x27; wieder (verschachtelte namespaces) on Thu, 07 Sep 2006 05:57:40 GMT]]></title><description><![CDATA[<p>MaximumAccessViolation schrieb:</p>
<blockquote>
<p>Ich hab nie behauptet, dass ich ISO C++ gelernt hab... hab auch noch nie ein tut gesehen, in dem std:: mit angegeben war... egal... std:: nervt irgendwie, soll ich etz meinen kompletten Code nach allen Funktionen, bei denen std:: fehlt durchsuchen? using namespace funktioniert ja nur in der Funktion ...</p>
</blockquote>
<p>Nein, du solltest dir mal eher was zum Thema namespaces durchlesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1132707</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1132707</guid><dc:creator><![CDATA[Delryn]]></dc:creator><pubDate>Thu, 07 Sep 2006 05:57:40 GMT</pubDate></item></channel></rss>