<?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[Bitte um Hilfe.]]></title><description><![CDATA[<p>Hallo zusammen ,<br />
ich bin C++ Anfänger und habe in meinem Quellcode einen oder mehrere Fehler. Ich benutze Dev-c++. Beim Kompilieren werden immer sofort mehrere Fehlermeldungen angezeigt. Ich kann aber ne Fehler nicht finden. Könnte mir von euch einer helfen?</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;stdlib.h&gt;</p>
<p>class iep {<br />
public:<br />
char matrikel[10];<br />
char nachname[32];<br />
char vorname[32];<br />
char v1[3];<br />
char v2[3];<br />
char v3[3];<br />
char ergebnis[3];<br />
void einlesen (char *matrikel,char *nachname, char *vorname,char *v1, char *v2, char *v3);<br />
void auswerten (void);<br />
void ausgeben (void);<br />
};</p>
<p>int main(void)<br />
{<br />
iep stud1, stud2, stud3, stud4;<br />
char dummy;</p>
<p>stud1.einlesen(&quot;20020001&quot; ,&quot;Schmidt&quot;,&quot;Anna&quot;,&quot;11&quot;,&quot;11&quot;,&quot;11&quot;);<br />
stud1.auswerten();<br />
stud1.ausgeben();</p>
<p>stud2.einlesen(&quot;20020002&quot; ,&quot;Müller&quot;,&quot;Olaf&quot;,&quot;10&quot;,&quot;10&quot;,&quot;00&quot;);<br />
stud2.auswerten();<br />
stud2.ausgeben();</p>
<p>stud3.einlesen(&quot;20020003&quot; ,&quot;Brzoska&quot;,&quot;Philipp&quot;,&quot;11&quot;,&quot;1u&quot;,&quot;1u&quot;);<br />
stud3.auswerten();<br />
stud3.ausgeben();</p>
<p>stud4.einlesen(&quot;20020004&quot; ,&quot;Lostermann&quot;,&quot;Hendrik&quot;,&quot;00&quot;,&quot;00&quot;,&quot;00&quot;);<br />
stud4.auswerten();<br />
stud4.ausgeben();</p>
<p>std::cout &lt;&lt; &quot;Programmende bei Tastendruck a.....z :&quot; &lt;&lt; endl;<br />
cin &gt;&gt; dummy;</p>
<p>return 0;</p>
<p>}</p>
<p>void iep::einlesen(char *matrikel, char *nachname, char *vorname, char *v1, char *v3)</p>
<p>{<br />
strcpy(iep::matrikel,matrikel);<br />
strcpy(iep::nachname,nachname);<br />
strcpy(iep::vorname,vorname);<br />
strcpy(iep::v1, v1);<br />
strcpy(iep::v2, v2);<br />
strcpy(iep::v3, v3);<br />
strcpy(iep::ergebnis, &quot;00&quot;);<br />
}</p>
<p>void iep::auswerten(void)<br />
{<br />
int v1, v2, v3;<br />
v1 = atoi(iep::v1);<br />
v2 = atoi(iep::v2);<br />
v3 = atoi(iep::v3);</p>
<p>if ( (v1==11) &amp;&amp; (v2==11) &amp;&amp; v3==11))<br />
strcpy(iep::ergebnis, &quot;OK&quot;);</p>
<p>else if ( (v1==0) &amp;&amp; (v2==0) &amp;&amp; v3==0))<br />
strcpy(iep::ergebnis, &quot;nt&quot;);</p>
<p>else<br />
strcpy(iep::ergebnis, &quot;nb&quot;);<br />
}</p>
<p>void iep::ausgeben(void)<br />
{<br />
cout&lt;&lt; &quot;Matrikel-Nr.: &quot; &lt;&lt; iep::matrikel &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Nachname: &quot; &lt;&lt; iep::nachname &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Vorname &quot; &lt;&lt; iep::vorname &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Versuch 1: &quot; &lt;&lt; iep::v1 &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Versuch 2:&quot; &lt;&lt; iep::v2 &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Versuch 3: &quot; &lt;&lt; iep::v3 &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Ergebnis: &quot; &lt;&lt; ergebnis &lt;&lt;endl&lt;&lt;endl;<br />
}</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/223319/bitte-um-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Sat, 03 Oct 2026 22:08:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/223319.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 24 Sep 2008 16:26:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bitte um Hilfe. on Wed, 24 Sep 2008 16:26:58 GMT]]></title><description><![CDATA[<p>Hallo zusammen ,<br />
ich bin C++ Anfänger und habe in meinem Quellcode einen oder mehrere Fehler. Ich benutze Dev-c++. Beim Kompilieren werden immer sofort mehrere Fehlermeldungen angezeigt. Ich kann aber ne Fehler nicht finden. Könnte mir von euch einer helfen?</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;string.h&gt;<br />
#include &lt;stdlib.h&gt;</p>
<p>class iep {<br />
public:<br />
char matrikel[10];<br />
char nachname[32];<br />
char vorname[32];<br />
char v1[3];<br />
char v2[3];<br />
char v3[3];<br />
char ergebnis[3];<br />
void einlesen (char *matrikel,char *nachname, char *vorname,char *v1, char *v2, char *v3);<br />
void auswerten (void);<br />
void ausgeben (void);<br />
};</p>
<p>int main(void)<br />
{<br />
iep stud1, stud2, stud3, stud4;<br />
char dummy;</p>
<p>stud1.einlesen(&quot;20020001&quot; ,&quot;Schmidt&quot;,&quot;Anna&quot;,&quot;11&quot;,&quot;11&quot;,&quot;11&quot;);<br />
stud1.auswerten();<br />
stud1.ausgeben();</p>
<p>stud2.einlesen(&quot;20020002&quot; ,&quot;Müller&quot;,&quot;Olaf&quot;,&quot;10&quot;,&quot;10&quot;,&quot;00&quot;);<br />
stud2.auswerten();<br />
stud2.ausgeben();</p>
<p>stud3.einlesen(&quot;20020003&quot; ,&quot;Brzoska&quot;,&quot;Philipp&quot;,&quot;11&quot;,&quot;1u&quot;,&quot;1u&quot;);<br />
stud3.auswerten();<br />
stud3.ausgeben();</p>
<p>stud4.einlesen(&quot;20020004&quot; ,&quot;Lostermann&quot;,&quot;Hendrik&quot;,&quot;00&quot;,&quot;00&quot;,&quot;00&quot;);<br />
stud4.auswerten();<br />
stud4.ausgeben();</p>
<p>std::cout &lt;&lt; &quot;Programmende bei Tastendruck a.....z :&quot; &lt;&lt; endl;<br />
cin &gt;&gt; dummy;</p>
<p>return 0;</p>
<p>}</p>
<p>void iep::einlesen(char *matrikel, char *nachname, char *vorname, char *v1, char *v3)</p>
<p>{<br />
strcpy(iep::matrikel,matrikel);<br />
strcpy(iep::nachname,nachname);<br />
strcpy(iep::vorname,vorname);<br />
strcpy(iep::v1, v1);<br />
strcpy(iep::v2, v2);<br />
strcpy(iep::v3, v3);<br />
strcpy(iep::ergebnis, &quot;00&quot;);<br />
}</p>
<p>void iep::auswerten(void)<br />
{<br />
int v1, v2, v3;<br />
v1 = atoi(iep::v1);<br />
v2 = atoi(iep::v2);<br />
v3 = atoi(iep::v3);</p>
<p>if ( (v1==11) &amp;&amp; (v2==11) &amp;&amp; v3==11))<br />
strcpy(iep::ergebnis, &quot;OK&quot;);</p>
<p>else if ( (v1==0) &amp;&amp; (v2==0) &amp;&amp; v3==0))<br />
strcpy(iep::ergebnis, &quot;nt&quot;);</p>
<p>else<br />
strcpy(iep::ergebnis, &quot;nb&quot;);<br />
}</p>
<p>void iep::ausgeben(void)<br />
{<br />
cout&lt;&lt; &quot;Matrikel-Nr.: &quot; &lt;&lt; iep::matrikel &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Nachname: &quot; &lt;&lt; iep::nachname &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Vorname &quot; &lt;&lt; iep::vorname &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Versuch 1: &quot; &lt;&lt; iep::v1 &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Versuch 2:&quot; &lt;&lt; iep::v2 &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Versuch 3: &quot; &lt;&lt; iep::v3 &lt;&lt;endl;<br />
cout&lt;&lt; &quot;Ergebnis: &quot; &lt;&lt; ergebnis &lt;&lt;endl&lt;&lt;endl;<br />
}</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1587450</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1587450</guid><dc:creator><![CDATA[Philipp1208205]]></dc:creator><pubDate>Wed, 24 Sep 2008 16:26:58 GMT</pubDate></item><item><title><![CDATA[Reply to Bitte um Hilfe. on Wed, 24 Sep 2008 16:35:36 GMT]]></title><description><![CDATA[<p>Könntest du evtl. die Fehlermeldungen auch noch posten? Das wäre sehr hilfreich. <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="🙂"
    /><br />
Ich würde dir raten mit std::string statt mit char-Arrays zu arbeiten. Das macht das leben viel leichter.<br />
Nutze bitte auch die C++Tags hier im Forum.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1587455</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1587455</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 24 Sep 2008 16:35:36 GMT</pubDate></item><item><title><![CDATA[Reply to Bitte um Hilfe. on Wed, 24 Sep 2008 16:41:18 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>hab jetzt überall std::string für char geschrieben.</p>
<p>Beim kompelieren erscheint folgende Fehlermeldung:</p>
<p>In Zeile : std::cout &lt;&lt; &quot;Programmen..... In function 'int main()'</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1587458</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1587458</guid><dc:creator><![CDATA[Philipp1208205]]></dc:creator><pubDate>Wed, 24 Sep 2008 16:41:18 GMT</pubDate></item><item><title><![CDATA[Reply to Bitte um Hilfe. on Wed, 24 Sep 2008 16:43:05 GMT]]></title><description><![CDATA[<p>Das ist mit Sicherheit nicht die ganze Fehlermeldung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1587460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1587460</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 24 Sep 2008 16:43:05 GMT</pubDate></item><item><title><![CDATA[Reply to Bitte um Hilfe. on Wed, 24 Sep 2008 16:49:25 GMT]]></title><description><![CDATA[<p>Hier ein Teil der Fehlermeldungen.</p>
<p>In function <code>int main()': .cpp:40: error:</code>endl' undeclared (first use this function)<br />
.cpp:40: error: (Each undeclared identifier is reported only once for each function it appears in.)<br />
.cpp: At global scope:<br />
.cpp:51: error: prototype for `void iep::einlesen(char*, char*, char*, char*, char*)' does not match any in class `iep'<br />
.cpp:14: error: candidate is: void iep::einlesen(char*, char*, char*, char*, char*, char*)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1587468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1587468</guid><dc:creator><![CDATA[Philipp1208205]]></dc:creator><pubDate>Wed, 24 Sep 2008 16:49:25 GMT</pubDate></item><item><title><![CDATA[Reply to Bitte um Hilfe. on Wed, 24 Sep 2008 17:12:00 GMT]]></title><description><![CDATA[<p>Bei endl fehlt das std:: (ist ja auch in diesem namespace).<br />
Der zweite Fehler<br />
Du hast iep::einlesen mit 5 Parametern deklariert aber mit 6 definiert. Das passt nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1587482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1587482</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 24 Sep 2008 17:12:00 GMT</pubDate></item><item><title><![CDATA[Reply to Bitte um Hilfe. on Wed, 24 Sep 2008 18:08:30 GMT]]></title><description><![CDATA[<p>oder mach ein<br />
&quot;using namespace std;&quot;</p>
<p>an den anfang des <strong>source</strong> files.<br />
In headern sollte man using namespace klauseln vermeiden und lieber den komplett qualifizierten namen verwenden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1587511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1587511</guid><dc:creator><![CDATA[vlad_tepesch]]></dc:creator><pubDate>Wed, 24 Sep 2008 18:08:30 GMT</pubDate></item></channel></rss>