<?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[C4430 mit C2146]]></title><description><![CDATA[<p>hi leute</p>
<p>ich hänge jetzt die ganze zeit schon an einem problem:<br />
und zwar wird der fehler C4430 zusammen mit C2146 erzeugt -&gt;<br />
error C2146:Syntaxfehler: Fehlendes ';' vor Bezeichner 'm_GameManager'<br />
error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: &quot;default-int&quot; wird von C++ nicht unterstützt.</p>
<p>erzeugt wird das in dieser datei in zeile &lt;CGameManager m_GameManager;&gt;</p>
<pre><code class="language-cpp">#ifndef CGateway_h_
#define CGateway_h_ CGateway_h_
//------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------
#include &lt;TriBase.h&gt;
#include &lt;d3d9.h&gt;
#include &lt;d3dx9.h&gt;
#include &quot;GameManager.h&quot;
#include &quot;Globals.h&quot;
//------------------------------------------------------------------------
// Forward Declarations
//------------------------------------------------------------------------
tbResult Render(float);
tbResult Move(float);
//------------------------------------------------------------------------
class CGateway
{
public:
	CGateway(HINSTANCE hInstance);
	~CGateway(void);

	tbResult init(void);
	tbResult exit(void);

	tbResult run(void);

	tbResult load(void);
	tbResult unload(void);

	tbResult render(float fTime);
	tbResult update(float fTime);

private:
	bool m_isInit;
	HINSTANCE m_hInstance;
	tbConfig m_Config;
	CGameManager m_GameManager;
};
//------------------------------------------------------------------------
#endif // CGateway_h_
</code></pre>
<p>ich hänge seit 2 stunden an dem fehler und kann das programm nicht compilen<br />
wenn ihr hier auch nichts seht, sagt welche datei gebraucht wird, die poste ich dann...</p>
<p>danke an euch</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/273071/c4430-mit-c2146</link><generator>RSS for Node</generator><lastBuildDate>Fri, 28 Aug 2026 11:36:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/273071.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Aug 2010 17:41:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C4430 mit C2146 on Mon, 30 Aug 2010 17:41:03 GMT]]></title><description><![CDATA[<p>hi leute</p>
<p>ich hänge jetzt die ganze zeit schon an einem problem:<br />
und zwar wird der fehler C4430 zusammen mit C2146 erzeugt -&gt;<br />
error C2146:Syntaxfehler: Fehlendes ';' vor Bezeichner 'm_GameManager'<br />
error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: &quot;default-int&quot; wird von C++ nicht unterstützt.</p>
<p>erzeugt wird das in dieser datei in zeile &lt;CGameManager m_GameManager;&gt;</p>
<pre><code class="language-cpp">#ifndef CGateway_h_
#define CGateway_h_ CGateway_h_
//------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------
#include &lt;TriBase.h&gt;
#include &lt;d3d9.h&gt;
#include &lt;d3dx9.h&gt;
#include &quot;GameManager.h&quot;
#include &quot;Globals.h&quot;
//------------------------------------------------------------------------
// Forward Declarations
//------------------------------------------------------------------------
tbResult Render(float);
tbResult Move(float);
//------------------------------------------------------------------------
class CGateway
{
public:
	CGateway(HINSTANCE hInstance);
	~CGateway(void);

	tbResult init(void);
	tbResult exit(void);

	tbResult run(void);

	tbResult load(void);
	tbResult unload(void);

	tbResult render(float fTime);
	tbResult update(float fTime);

private:
	bool m_isInit;
	HINSTANCE m_hInstance;
	tbConfig m_Config;
	CGameManager m_GameManager;
};
//------------------------------------------------------------------------
#endif // CGateway_h_
</code></pre>
<p>ich hänge seit 2 stunden an dem fehler und kann das programm nicht compilen<br />
wenn ihr hier auch nichts seht, sagt welche datei gebraucht wird, die poste ich dann...</p>
<p>danke an euch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946242</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946242</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Mon, 30 Aug 2010 17:41:03 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Mon, 30 Aug 2010 17:46:48 GMT]]></title><description><![CDATA[<p>Gibt es in GameManager.h eine Definition von CGameManager?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946244</guid><dc:creator><![CDATA[brotbernd]]></dc:creator><pubDate>Mon, 30 Aug 2010 17:46:48 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Mon, 30 Aug 2010 17:52:52 GMT]]></title><description><![CDATA[<p>da ist die gesamte klasse deklariert und moment jetzt muss ich überlegen wie ichs richtig sage:</p>
<p>GameManager.h beeinhaltet folgendes:<br />
class CGameManager<br />
{<br />
int methode1();<br />
int methode2();<br />
...</p>
<p>int member1;<br />
};</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946248</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Mon, 30 Aug 2010 17:52:52 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Tue, 31 Aug 2010 07:15:22 GMT]]></title><description><![CDATA[<p>Skym0sh0 schrieb:</p>
<blockquote>
<p>da ist die gesamte klasse deklariert und moment jetzt muss ich überlegen wie ichs richtig sage:</p>
<p>GameManager.h beeinhaltet folgendes:<br />
class CGameManager<br />
{<br />
int methode1();<br />
int methode2();<br />
...</p>
<p>int member1;<br />
};</p>
</blockquote>
<p>Und das letzte ; ist ganz sicher drin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946380</guid><dc:creator><![CDATA[padreigh]]></dc:creator><pubDate>Tue, 31 Aug 2010 07:15:22 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Tue, 31 Aug 2010 11:11:47 GMT]]></title><description><![CDATA[<p>Lass dir mal den Präprozessor-Output ausgeben und schau, ob DORT auch die Definition von CGameManager drin steckt. (Definition, nicht Deklaration! Deklaration wäre nur eine Zeile &quot;class CGameManager;&quot;)<br />
Ggf. ist in dem Header ein include-guard vorhanden, das an anderer Stelle schon definiert wurde -&gt; der Inhalt des Headers würde übersprungen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946503</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946503</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Tue, 31 Aug 2010 11:11:47 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Tue, 31 Aug 2010 16:16:00 GMT]]></title><description><![CDATA[<p>mh hab mir das angeguckt<br />
und wenn ich das richtig sehe wird die datei ordnungsgemäß eingebunden...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946655</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946655</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Tue, 31 Aug 2010 16:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Tue, 31 Aug 2010 19:43:25 GMT]]></title><description><![CDATA[<p>kommentier mal bitte die includes der Header, die NICHT von dir stammen aus (ich vermute Tribase.h, d3d9.h, d3dx9.h) und poste hier das, was danach aus dem präprozessor kommt. Alternativ den Inhalt von GameManager.h und Globals.h - wobei ich bei letzterem Angst um meine Zehennägel habe, klingt nach einer Sammlung globaler Variablen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946744</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946744</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Tue, 31 Aug 2010 19:43:25 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Tue, 31 Aug 2010 20:11:29 GMT]]></title><description><![CDATA[<p>In GameManager.h steht nicht zufällig:</p>
<pre><code class="language-cpp">#include &quot;CGateway.h&quot;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1946759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946759</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Tue, 31 Aug 2010 20:11:29 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Wed, 01 Sep 2010 06:49:43 GMT]]></title><description><![CDATA[<p>nein</p>
<p>aber da steht #include &quot;Globals.h&quot; und da wird das gateway includet...</p>
<p>allerdings hab ich auch in globals.h forward declarations für CGameManager und CGateway</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946825</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946825</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Wed, 01 Sep 2010 06:49:43 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Wed, 01 Sep 2010 07:10:34 GMT]]></title><description><![CDATA[<p>Skym0sh0 schrieb:</p>
<blockquote>
<p>aber da steht #include &quot;Globals.h&quot; und da wird das gateway includet...</p>
</blockquote>
<p>Das heißt, Globals.h und CGateway.h binden sich gegenseitig ein?</p>
<p>Kann nicht funktionieren, lös das auf.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946835</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946835</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 01 Sep 2010 07:10:34 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Wed, 01 Sep 2010 07:39:27 GMT]]></title><description><![CDATA[<p>mh ok hab ich, jetzt klappts auch</p>
<p>aber ich hatte eigentlich in errinerung dass das geht...<br />
naja vllt von java her</p>
<p>danke auf jedenfall</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946846</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946846</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Wed, 01 Sep 2010 07:39:27 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Wed, 01 Sep 2010 09:33:37 GMT]]></title><description><![CDATA[<p>in java gibt es keine includes</p>
<p>setzt dich ein wenig mit der materie auseinander, also wie das C++ übersetzungsmodell aussieht, was #include eigentlich macht. dann sollte dir schnell klar werden, dass es nicht gehen *kann*.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1946880</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1946880</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Wed, 01 Sep 2010 09:33:37 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Wed, 01 Sep 2010 21:58:18 GMT]]></title><description><![CDATA[<p>jaja mir ist schon klar dass include die angegebene datei da einfach einsetzt</p>
<p>aber ich hatte in errinerung hier gelesen zu haben dass gegenseittiges inkludieren funktioniert...<br />
und damit sollte ja auch mein problem weg sein dann</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947156</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Wed, 01 Sep 2010 21:58:18 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Wed, 01 Sep 2010 22:03:46 GMT]]></title><description><![CDATA[<p>Skym0sh0 schrieb:</p>
<blockquote>
<p>jaja mir ist schon klar dass include die angegebene datei da einfach einsetzt</p>
<p>aber ich hatte in errinerung hier gelesen zu haben dass gegenseittiges inkludieren funktioniert...</p>
</blockquote>
<p>Denk noch mal genau nach, weshalb hier ein Widerspruch vorliegt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947158</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 01 Sep 2010 22:03:46 GMT</pubDate></item><item><title><![CDATA[Reply to C4430 mit C2146 on Wed, 01 Sep 2010 22:38:09 GMT]]></title><description><![CDATA[<p>natürlich funktioniert gegenseitiges includen.</p>
<p>nur ändert es nichts daran, dass der compiler zuerst ne definition oder fwd. decl. einer klasse sehen muss, bevor man sie irgendwo verwenden kann. und je nach verwendung reicht eine fwd. decl. dann oder eben auch nicht.</p>
<p>und es fällt mir jetzt auch auf die schnelle nur eine &quot;sinnvolle&quot; anwendung ein. nämlich wenn man dinge der übersichtlichkeit halber in mehrere header-files aufsplitten will.</p>
<p>z.b. ein template und dessen definition, oder das basis-template und dazugehörende spezialisierungen.<br />
wenn man dann möchte dass<br />
a) der user jedes dieser files direkt inkludieren darf und<br />
b) trotzdem alle zusammengehörenden files inkludiert werden<br />
dann kann man gegenseitig includen.<br />
dabei stehen die #include dann aber in zumindest einem file am ende.</p>
<p>beispiel:</p>
<pre><code class="language-cpp">// a.hpp

#pragma once

template &lt;class T&gt; class foo { ... };

#include &quot;b.hpp&quot;
#include &quot;c.hpp&quot;

// b.hpp

#pragma once
#include &quot;a.hpp&quot;

template &lt;&gt; class foo&lt;int&gt; { ... };

// c.hpp

#pragma once
#include &quot;a.hpp&quot;

template &lt;&gt; class foo&lt;short&gt; { ... };
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1947161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947161</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Wed, 01 Sep 2010 22:38:09 GMT</pubDate></item></channel></rss>