<?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[Fehler beim kompelieren... wa sist daran falsch?]]></title><description><![CDATA[<p>hi<br />
ich bin gerade dabei ein kleines projekt so zum spaß zu machen und habe ein problem. mein compiler (microsoft visual c++ 6.0) schreibt mir folgende fehler:</p>
<p>sprite.h(14) : error C2146: Syntaxfehler : Fehlendes ',' vor Bezeichner 'sFilename'<br />
sprite.h(14) : error C2061: Syntaxfehler : Bezeichner 'sFilename'<br />
sprite.h(15) : error C2146: Syntaxfehler : Fehlendes ',' vor Bezeichner 'sFilename'<br />
sprite.h(15) : error C2061: Syntaxfehler : Bezeichner 'sFilename'<br />
sprite.h(15) : error C2535: 'void __thiscall CSprite::Load(const int)' : Member-Funktion bereits definiert oder deklariert<br />
sprite.h(14) : Siehe Deklaration von 'Load'</p>
<p>ein teil der klasse im header file, wo der compiler meckert sieht so aus:</p>
<pre><code class="language-cpp">class CSprite
{
	public:
		CSprite ();
		~CSprite();

		void Load (const string sFilename);
		void Load (const string sFilename, int NumFrames, int FrameWidth, int FrameHeight);
		void SetColorKey (int R, int G, int B);

.
.
.
};
</code></pre>
<p>dabei muss ich anmerken dass die klasse aus dem buch &quot;C++ für Spieleprogrammierer&quot; ist. ich weiss allerdings nicht was an der Funktion Load falsch sein soll. hab ich vergessen dem projekt irgendetwas zuzuweisen?<br />
bitte um hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/127760/fehler-beim-kompelieren-wa-sist-daran-falsch</link><generator>RSS for Node</generator><lastBuildDate>Tue, 25 Aug 2026 05:32:17 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/127760.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Nov 2005 11:26:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 11:26:11 GMT]]></title><description><![CDATA[<p>hi<br />
ich bin gerade dabei ein kleines projekt so zum spaß zu machen und habe ein problem. mein compiler (microsoft visual c++ 6.0) schreibt mir folgende fehler:</p>
<p>sprite.h(14) : error C2146: Syntaxfehler : Fehlendes ',' vor Bezeichner 'sFilename'<br />
sprite.h(14) : error C2061: Syntaxfehler : Bezeichner 'sFilename'<br />
sprite.h(15) : error C2146: Syntaxfehler : Fehlendes ',' vor Bezeichner 'sFilename'<br />
sprite.h(15) : error C2061: Syntaxfehler : Bezeichner 'sFilename'<br />
sprite.h(15) : error C2535: 'void __thiscall CSprite::Load(const int)' : Member-Funktion bereits definiert oder deklariert<br />
sprite.h(14) : Siehe Deklaration von 'Load'</p>
<p>ein teil der klasse im header file, wo der compiler meckert sieht so aus:</p>
<pre><code class="language-cpp">class CSprite
{
	public:
		CSprite ();
		~CSprite();

		void Load (const string sFilename);
		void Load (const string sFilename, int NumFrames, int FrameWidth, int FrameHeight);
		void SetColorKey (int R, int G, int B);

.
.
.
};
</code></pre>
<p>dabei muss ich anmerken dass die klasse aus dem buch &quot;C++ für Spieleprogrammierer&quot; ist. ich weiss allerdings nicht was an der Funktion Load falsch sein soll. hab ich vergessen dem projekt irgendetwas zuzuweisen?<br />
bitte um hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928197</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928197</guid><dc:creator><![CDATA[beuschl]]></dc:creator><pubDate>Sun, 27 Nov 2005 11:26:11 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 11:33:33 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Keine Ahnung ob das hilft, aber schrieb statt</p>
<pre><code class="language-cpp">string
</code></pre>
<p>mal</p>
<pre><code class="language-cpp">std::string
</code></pre>
<p>und binde cstring mit ein.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928201</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928201</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 27 Nov 2005 11:33:33 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 11:41:55 GMT]]></title><description><![CDATA[<p>Nicht &lt;cstring&gt; sondern <strong>&lt;string&gt;</strong>.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928205</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928205</guid><dc:creator><![CDATA[PuppetMaster2k]]></dc:creator><pubDate>Sun, 27 Nov 2005 11:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 11:44:43 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>PuppetMaster2k schrieb:</p>
<blockquote>
<p>Nicht &lt;cstring&gt; sondern <strong>&lt;string&gt;</strong>.</p>
</blockquote>
<p>Warum? Ich habe mal gelesen, dass man cstring einbinden soll. Was ist der Vorteil von string gegenüber cstring (ich gebe zu, dass ich die Umkehrfrage nicht beantworten könnte)</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928209</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928209</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 27 Nov 2005 11:44:43 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 11:46:41 GMT]]></title><description><![CDATA[<p>Probier mal folgendes oben in die Datei zu schreiben:</p>
<pre><code class="language-cpp">#include &lt;string&gt;
using namespace std;
</code></pre>
<p>Sieht so aus, als würde string nicht als Datentyp erkannt werden. In &lt;cstring&gt; sind die alten C-String-Funktionen, wie z. Bsp. strlen, aber nicht die Klasse string definiert. Achso, nimm lieber einen anderen Compiler. Wenn du auf Visual Studio stehst, <a href="http://msdn.microsoft.com/vstudio/express/support/install/" rel="nofollow">hier</a> gibt es die Express Edition kostenlos. Als Alternative würde ich <a href="http://www.codeblocks.org/" rel="nofollow">Code::Blocks</a> mit MinGW oder VC7 empfehlen. Der VC7 ist <a href="http://msdn.microsoft.com/visualc/vctoolkit2003/" rel="nofollow">hier</a> kostenlos zu haben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928212</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928212</guid><dc:creator><![CDATA[Spezi L]]></dc:creator><pubDate>Sun, 27 Nov 2005 11:46:41 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 12:26:32 GMT]]></title><description><![CDATA[<p>danke sehr jetzt funktioniert das kompilieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928258</guid><dc:creator><![CDATA[beuschl]]></dc:creator><pubDate>Sun, 27 Nov 2005 12:26:32 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 12:44:53 GMT]]></title><description><![CDATA[<p>noch ein Tipp:<br />
Das const vor string bringt dir herzlich wenig, sofern du keine Referenz verwendest. Schreib also besser:</p>
<pre><code class="language-cpp">void Load (const string&amp; sFilename, int NumFrames, int FrameWidth, int FrameHeight);
</code></pre>
<p>Und lass die ungarische Notation weg, das bringt dir überhaupt nichts.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928276</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928276</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sun, 27 Nov 2005 12:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 13:09:50 GMT]]></title><description><![CDATA[<p>chrische5 schrieb:</p>
<blockquote>
<p>Warum? Ich habe mal gelesen, dass man cstring einbinden soll. Was ist der Vorteil von string gegenüber cstring</p>
</blockquote>
<p>Das ist einfach zu beantworten: Wenn man mit std::string arbeiten will, dann hat &lt;string&gt; den Riesenvorteil, daß es std::string mit reinbringt und &lt;cstring&gt; nicht. &lt;cstring&gt; ist der alte C-Header string.h und enthält die Zeichenkettenmanipulationsfunktionen von C.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928292</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928292</guid><dc:creator><![CDATA[Jester]]></dc:creator><pubDate>Sun, 27 Nov 2005 13:09:50 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 13:54:29 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>groovemaster schrieb:</p>
<blockquote>
<p>noch ein Tipp:<br />
Das const vor string bringt dir herzlich wenig, sofern du keine Referenz verwendest. Schreib also besser:</p>
<pre><code class="language-cpp">void Load (const string&amp; sFilename, int NumFrames, int FrameWidth, int FrameHeight);
</code></pre>
<p>Und lass die ungarische Notation weg, das bringt dir überhaupt nichts.</p>
</blockquote>
<p>Der erste Teil klingt seh logisch. Der zweite Teil ist ja wohl wirklich jedem selber überlassen. Ich persönlich finde es ganz praktisch.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928337</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928337</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 27 Nov 2005 13:54:29 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 13:57:51 GMT]]></title><description><![CDATA[<p><a href="http://www.wikiservice.at/dse/wiki.cgi?UngarischeNotationJaOderNein" rel="nofollow">http://www.wikiservice.at/dse/wiki.cgi?UngarischeNotationJaOderNein</a></p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928338</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928338</guid><dc:creator><![CDATA[FireFlow]]></dc:creator><pubDate>Sun, 27 Nov 2005 13:57:51 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 14:05:19 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Da überwiegen anscheinend die Nachteile, obwohl ich nicht alles verstehe, was dort als Nachteil bezeichnet wird:</p>
<blockquote>
<p>es ist gegen das objektorientierte Prinzip</p>
</blockquote>
<p>Warum verstosst es gegen das bjektoriebtierte Prinzip, wenn ich Memebrvariablen den Präfix m_ gebe?</p>
<blockquote>
<p>die C++ Standardlibrary macht das auch nicht</p>
</blockquote>
<p>Die MFC machts un die können wohl programmieren.</p>
<p>Aber diese Diskussion gab es wohl schon tausendmal. Da ich echt noch am Anfang stehe, finde ich es praktische, weil ich dadurch das Gefühl den Quellcode besser zu strukturieren.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/928344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928344</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 27 Nov 2005 14:05:19 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompelieren... wa sist daran falsch? on Sun, 27 Nov 2005 14:50:26 GMT]]></title><description><![CDATA[<p>chrische5 schrieb:</p>
<blockquote>
<blockquote>
<p>es ist gegen das objektorientierte Prinzip</p>
</blockquote>
<p>Warum verstosst es gegen das bjektoriebtierte Prinzip, wenn ich Memebrvariablen den Präfix m_ gebe?</p>
</blockquote>
<p>das kannst du ruhig machen, ist aber auch nich unbedingt das, was die ungarische notation aussagt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/928386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/928386</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Sun, 27 Nov 2005 14:50:26 GMT</pubDate></item></channel></rss>