<?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 bei Header]]></title><description><![CDATA[<p>#ifndef CKOORDINATE_H_<br />
#define CKOORDINATE_H_</p>
<p>#include&lt;iostream&gt;<br />
using namespace std;<br />
class CKoordinate(){<br />
int m_x = 0;<br />
int m_y = 0;</p>
<p>CKoordinate( int x = 0 , int y = 0);<br />
CKoordinate( CKoordinate&amp; origin);<br />
~CKoordinate();<br />
void print();<br />
bool move( int x , int y);<br />
bool minus( int x , int y);<br />
friend ostream&amp; operator &lt;&lt; (ostream&amp; out ,CKoordinate&amp; c);</p>
<p>};<br />
ostream&amp; operator &lt;&lt; (ostream&amp; out ,CKoordinate&amp; c); // Fehler Description Resource Path Location Type<br />
Type 'CKoordinate' could not be resolved CKoordinate.h /CKoordinate line 30 Semantic Error</p>
<p>#endif /* CKOORDINATE_H_ */</p>
<p>Kann mir jemand erklären wie ich den Fehler weg bekomme ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/331370/fehler-bei-header</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 16:47:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/331370.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 24 Feb 2015 18:21:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 18:21:29 GMT]]></title><description><![CDATA[<p>#ifndef CKOORDINATE_H_<br />
#define CKOORDINATE_H_</p>
<p>#include&lt;iostream&gt;<br />
using namespace std;<br />
class CKoordinate(){<br />
int m_x = 0;<br />
int m_y = 0;</p>
<p>CKoordinate( int x = 0 , int y = 0);<br />
CKoordinate( CKoordinate&amp; origin);<br />
~CKoordinate();<br />
void print();<br />
bool move( int x , int y);<br />
bool minus( int x , int y);<br />
friend ostream&amp; operator &lt;&lt; (ostream&amp; out ,CKoordinate&amp; c);</p>
<p>};<br />
ostream&amp; operator &lt;&lt; (ostream&amp; out ,CKoordinate&amp; c); // Fehler Description Resource Path Location Type<br />
Type 'CKoordinate' could not be resolved CKoordinate.h /CKoordinate line 30 Semantic Error</p>
<p>#endif /* CKOORDINATE_H_ */</p>
<p>Kann mir jemand erklären wie ich den Fehler weg bekomme ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444207</guid><dc:creator><![CDATA[dt]]></dc:creator><pubDate>Tue, 24 Feb 2015 18:21:29 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 18:37:43 GMT]]></title><description><![CDATA[<p>Was machen die runden Klammern da</p>
<pre><code class="language-cpp">class CKoordinate(){
</code></pre>
<p>?</p>
<p>Und entferne &quot;using namespace std;&quot; aus deinem Header - gewöhne dir es gar nicht erst an (auch wenn du im Header dann jeweils &quot;std::&quot; dazuschreiben mußt).</p>
<p>PS: Packe (demnächst) deinen Code in entsprechende Code bzw. C++ Tags.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444210</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444210</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Tue, 24 Feb 2015 18:37:43 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 18:48:00 GMT]]></title><description><![CDATA[<p>Wenn ich das using namespace weg mache bekomme ich den Fehler Description Resource Path Location Type<br />
Type 'ostream' could not be resolved CKoordinate.h /CKoordinate line 22 Semantic Error</p>
<p>Mit using namespace habe ich keine Fehler ?</p>
<p>Ich benutze Eclipse .</p>
<p>Wo soll ich denn genau std:: schreiben ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444212</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444212</guid><dc:creator><![CDATA[dt]]></dc:creator><pubDate>Tue, 24 Feb 2015 18:48:00 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 18:55:03 GMT]]></title><description><![CDATA[<p>Hat sich erledigt</p>
<pre><code>#ifndef CKOORDINATE_H_
#define CKOORDINATE_H_

#include&lt;iostream&gt;
class CKoordinate{
	int m_x = 0;
	int m_y = 0;

	CKoordinate( int x = 0 , int y = 0);
	CKoordinate( CKoordinate&amp; origin);
	~CKoordinate();
	void print();
	bool move( int x , int y);
	bool minus( int x , int y);
friend std::ostream&amp; operator &lt;&lt; (std::ostream&amp; out ,CKoordinate&amp; c);

};
 std::ostream&amp; operator &lt;&lt; (std::ostream&amp; out ,CKoordinate&amp; c);

#endif /* CKOORDINATE_H_ */
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2444214</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444214</guid><dc:creator><![CDATA[dt]]></dc:creator><pubDate>Tue, 24 Feb 2015 18:55:03 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 19:14:24 GMT]]></title><description><![CDATA[<p>vGibst pdu pin aanderen nSprachen aauch pimmer pan, awelchen nTyp aein nWort vhat, kdamit pes pjeder vweiß?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444218</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 24 Feb 2015 19:14:24 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 19:26:34 GMT]]></title><description><![CDATA[<p><a href="http://www.joelonsoftware.com/articles/Wrong.html" rel="nofollow">http://www.joelonsoftware.com/articles/Wrong.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444220</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444220</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 24 Feb 2015 19:26:34 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 19:26:44 GMT]]></title><description><![CDATA[<p>Sepp ich hatte sau schwierigkeiten zu verstehen was du gerade meintest.</p>
<p>Ich bearbeite ja gerade eine Aufgabe als übung ,vielleicht könnt ihr mir ja helfen .</p>
<p>Implementieren Sie den Konstruktor mit den vorgegebenen Default-Werten und unter<br />
Berücksichtigung der vorgegeben Gültigkeitsbereiche der Attribute. Für den Fall, dass ein<br />
Parameter den Gültigkeitsbereich verletzt, soll eine Warnung ausgegeben werden und das<br />
Attribut auf den Defaultwert gesetzt werden. Geben Sie die Adresse des angelegten Objektes<br />
sowie die Werte aller Attribute aus.</p>
<p>Die Zusicherung die im Uml Diagramm für den Konstruktor gegeben war , war die</p>
<p>0&lt;= m_x &lt;= 100</p>
<p>Ich habe mal probiert den Konstruktor zu implementieren , aber es scheint nicht so richtig zu sein .</p>
<p>Die adresse eines Objektes gibt man ja mit this aus ?</p>
<p>Aber was soll ich da schreiben , this.x ?</p>
<p>Das verstehe ich nicht so ganz gerade?</p>
<pre><code>#include&lt;iostream&gt;
#include&quot;CKoordinate.h&quot;
using namespace std;

CKoordinate(){

	if( 0&lt;= m_x &lt;= 100){
		return true;
		else(){
			cout &lt;&lt; &quot; Gueltigkeitsbereich verletzt &quot; &lt;&lt; endl;
			m_x = x;

		}

	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2444221</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444221</guid><dc:creator><![CDATA[dt]]></dc:creator><pubDate>Tue, 24 Feb 2015 19:26:44 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 19:42:32 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">std::cout &lt;&lt; this;

// besser hex:
std::cout &lt;&lt; std::ios::hex &lt;&lt; this;

// die member:
std::cout &lt;&lt; m_x;
std::cout &lt;&lt; m_y;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2444226</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444226</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 24 Feb 2015 19:42:32 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 19:56:18 GMT]]></title><description><![CDATA[<p>Ist meine Schleife dann insgesamt so in Ordnung ?</p>
<pre><code>#include&lt;iostream&gt;
#include&quot;CKoordinate.h&quot;
using namespace std;

CKoordinate(){

	if( 0&lt;= m_x &lt;= 100){
		return true;
		cout &lt;&lt; this &lt;&lt; endl;
		else(){
			cout &lt;&lt; &quot; Gueltigkeitsbereich verletzt &quot; &lt;&lt; endl;
			m_x = x;

		}

	}
}
</code></pre>
<p>Mir wird leider noch dieser Fehler angezigt ,denn ich nicht weg bekomme</p>
<p>Description Resource Path Location Type<br />
expected unqualified-id before ')' token CKoordinate.cpp /CKoordinate line 12 C/C++ Problem</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444229</guid><dc:creator><![CDATA[dt]]></dc:creator><pubDate>Tue, 24 Feb 2015 19:56:18 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 20:12:06 GMT]]></title><description><![CDATA[<p>dt schrieb:</p>
<blockquote>
<p>Ist meine Schleife dann insgesamt so in Ordnung ?</p>
</blockquote>
<p><a href="http://if-schleife.de/" rel="nofollow">Schleife?</a></p>
<p>dt schrieb:</p>
<blockquote>
<pre><code>// ...
        return true;

// ...
		else(){
// ...
</code></pre>
</blockquote>
<p><code>return</code> !? Echt jetzt? Was sagt denn dein Compiler <em>dazu</em>!?<br />
Was sollen die runden Klammern hinter dem <code>else</code> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444234</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 24 Feb 2015 20:12:06 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 20:24:38 GMT]]></title><description><![CDATA[<p>Mir werden jetzt nur noch diese Warnungen angezeigt.<br />
Description Resource Path Location Type<br />
comparisons like 'X&lt;=Y&lt;=Z' do not have their mathematical meaning [-Wparentheses] CKoordinate.cpp /CKoordinate line 14 C/C++ Problem<br />
non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default] CKoordinate.h /CKoordinate line 13 C/C++ Problem<br />
non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default] CKoordinate.h /CKoordinate line 14 C/C++ Problem</p>
<p>Code ist der :</p>
<p>[/code]<br />
#include&lt;iostream&gt;<br />
#include&quot;CKoordinate.h&quot;<br />
using namespace std;</p>
<p>CKoordinate::CKoordinate(int x , int y){</p>
<p>if( 0&lt;= m_x &lt;= 100){</p>
<p>cout &lt;&lt; this &lt;&lt; endl;<br />
}<br />
else{<br />
cout &lt;&lt; &quot; Gueltigkeitsbereich verletzt &quot; &lt;&lt; endl;<br />
m_x = x;</p>
<p>}</p>
<p>};<br />
[code=&quot;cpp&quot;]</p>
<p>Stimmt es jetzt zumindest inhaltlich ,weil ich lerne gerade für die Klausur ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444237</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444237</guid><dc:creator><![CDATA[dt]]></dc:creator><pubDate>Tue, 24 Feb 2015 20:24:38 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Header on Tue, 24 Feb 2015 20:46:14 GMT]]></title><description><![CDATA[<p>dt schrieb:</p>
<blockquote>
<p>comparisons like 'X&lt;=Y&lt;=Z' do not have their mathematical meaning [-Wparentheses] CKoordinate.cpp /CKoordinate line 14</p>
</blockquote>
<p>Ja. Und? Was könnte das wohl heißen?</p>
<p>Der Rest sagt dir daß du bitte mit der Option <code>-std=c++11</code> kompilieren sollst.</p>
<p>//edit:</p>
<p>dt schrieb:</p>
<blockquote>
<p>Stimmt es jetzt zumindest inhaltlich, weil ich lerne gerade für die Klausur?</p>
</blockquote>
<p>Ne. Aber da haperts so dermaßen an Grundlagen, daß man sich fragen muss, ob du in allen Vorlesungen und Übungen gut geschlafen hast.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444244</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Tue, 24 Feb 2015 20:46:14 GMT</pubDate></item></channel></rss>