<?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[Kann mir mal einer helfen?]]></title><description><![CDATA[<p>Hi kann mir mal bitte einer helfen. Ich kenne meine eigenen Fehler nicht.<br />
Schon mal danke im voraus. <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="😃"
    /></p>
<p>[cpp]//********************************************<br />
//********************************************<br />
// Arbeitsoperator 1.0 ***<br />
// ***<br />
//********************************************<br />
//********************************************</p>
<p>// include-Anweisungen</p>
<p>#include &lt;iostream.h&gt;<br />
#include &lt;fstream&gt;<br />
#include &lt;string&gt;<br />
using namespace std;</p>
<p>// =============================================================================</p>
<p>//main-Funktion</p>
<p>int main()<br />
{<br />
string Arbeiter,Arbeit,Antwort,Arbeiter_n,suchwort;<br />
int Stunden_von,Minuten_von,Stunden_bis,Minuten_bis,Antwort1,neuArbeiter,Arbeiter_2,Passwort;</p>
<p>start: cout&lt;&lt; &quot;Arbeitsoperator 1.0\n\n\n&quot;;</p>
<p>cout&lt;&lt; &quot;Waehlen sie eine Option:\n\n&quot;;<br />
cout&lt;&lt; &quot; 1- Neuen Arbeiter erstellen\n&quot;;<br />
cout&lt;&lt; &quot; 2- Arbeit eingeben\n\n&quot;;<br />
cout&lt;&lt; &quot;==============================\n&quot;;<br />
cout&lt;&lt; &quot; 3- Info\n&quot;;</p>
<p>cin&gt;&gt; Antwort1;<br />
// =============================================================================<br />
if (Antwort1 == &quot;1&quot;)<br />
{<br />
cout&lt;&lt; &quot;Geben sie bitte das Passwort ein:\n&quot;;<br />
cin&gt;&gt; Passwort;</p>
<p>if (Passwort == &quot;becker569&quot;)<br />
{</p>
<p>cout&lt;&lt; &quot;Geben sie bitte den Namen des Mitarbeiters den sie erstellen wollen&quot;;<br />
cout&lt;&lt; &quot;ein:\n&quot;;</p>
<p>cin&gt;&gt; neuArbeiter;</p>
<p>fstream f;<br />
f.open(&quot;Arbeiter.txt&quot;, ios::out | ios::ate |ios::app);<br />
f &lt;&lt; neuArbeiter&lt;&lt;&quot;\n&quot;;</p>
<p>f.close();</p>
<p>goto start;}<br />
// =============================================================================<br />
else<br />
{<br />
cout&lt;&lt; &quot;Sie haben ein falsches Passwort eingegeben!\n\n\n&quot;;<br />
cout&lt;&lt; &quot;Wenn sie das Passwort vergessen haben wenden sie sich an den Systemadministrator!\n&quot;;<br />
goto start;<br />
}<br />
}<br />
// =============================================================================<br />
if (Antwort==&quot;2&quot;)<br />
{</p>
<p>// Namen-Eingabe</p>
<p>cout&lt;&lt; &quot;Bitte geben sie ihren Namen ein (Max_Mustermann): &quot;;<br />
cin&gt;&gt;Arbeiter;</p>
<p>int position = text.find(Arbeiter, 0);}<br />
if (position != -1) {</p>
<p>// =============================================================================</p>
<p>// Schreib-Modul 1<br />
//------------------------------------------------------------------------------<br />
// Namen in Datei schreiben<br />
fstream f;<br />
f.open(&quot;Arbeit.txt&quot;, ios::out | ios::ate |ios::app);<br />
f &lt;&lt; Arbeiter&lt;&lt;&quot;\n\n&quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>// Uhrzeit-Eingabe</p>
<p>start2: cout&lt;&lt; &quot;Geben sie bitte die Uhrzeiten ein :\n&quot;;</p>
<p>cout&lt;&lt; &quot;Von:\n\n&quot;;</p>
<p>cout&lt;&lt; &quot;Stunde:\n&quot;;<br />
cin&gt;&gt; Stunden_von;</p>
<p>cout&lt;&lt; &quot;Minuten:\n&quot;;<br />
cin&gt;&gt; Minuten_von;</p>
<p>cout&lt;&lt; &quot;Bis:\n\n &quot;;</p>
<p>cout&lt;&lt; &quot;Stunden:\n &quot;;<br />
cin&gt;&gt; Stunden_bis;</p>
<p>cout&lt;&lt; &quot; Minuten:\n &quot;;<br />
cin&gt;&gt; Minuten_bis;</p>
<p>// =============================================================================</p>
<p>// Schreib-Modul 2</p>
<p>//------------------------------------------------------------------------------<br />
// Uhrzeit in Datei schreiben</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);<br />
f &lt;&lt;&quot;(&quot;&lt;&lt; Stunden_von&lt;&lt;&quot;:&quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);<br />
f &lt;&lt; Minuten_von&lt;&lt;&quot;Uhr bis &quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out |ios::app);<br />
f &lt;&lt; Stunden_bis&lt;&lt;&quot;:&quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);<br />
f &lt;&lt; Minuten_bis&lt;&lt;&quot;Uhr )\n\n\n &quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>// Beschäftigung eingeben</p>
<p>cout&lt;&lt; &quot; Bitte geben sie ihre Beschaeftigung waehrend dieser Zeit ein(Mit Unterstrich): \n&quot;;<br />
cin&gt;&gt; Arbeit;</p>
<p>// Beschäftigung in Datei schreiben</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::ate |ios::app);<br />
f &lt;&lt; Arbeit&lt;&lt;&quot;\n\n\n\n&quot;;</p>
<p>f.close();<br />
}<br />
// =============================================================================<br />
else<br />
{<br />
goto start;<br />
}</p>
<p>cout&lt;&lt;&quot;Wollen sie noch mehr eingeben? (ja/nein)&quot;;<br />
cin&gt;&gt;Antwort;</p>
<p>if (Antwort == &quot;ja&quot;) // If-Anweisung<br />
{<br />
goto start2;</p>
<p>}</p>
<p>else // Else-Anweisung (Beendet das Programm)<br />
{<br />
f.open(&quot;Arbeit.txt&quot;, ios::out |ios::app);<br />
f &lt;&lt; &quot;=====================================\n\n&quot;;</p>
<p>f.close();<br />
}</p>
<p>}}} // Schluss Klammern<br />
[cpp]</p>
<p>Ich weiss es sieht nicht gerade schön aus aber ich bitte um Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/153888/kann-mir-mal-einer-helfen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 22:30:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/153888.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Jul 2006 14:13:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Fri, 21 Jul 2006 14:13:59 GMT]]></title><description><![CDATA[<p>Hi kann mir mal bitte einer helfen. Ich kenne meine eigenen Fehler nicht.<br />
Schon mal danke im voraus. <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="😃"
    /></p>
<p>[cpp]//********************************************<br />
//********************************************<br />
// Arbeitsoperator 1.0 ***<br />
// ***<br />
//********************************************<br />
//********************************************</p>
<p>// include-Anweisungen</p>
<p>#include &lt;iostream.h&gt;<br />
#include &lt;fstream&gt;<br />
#include &lt;string&gt;<br />
using namespace std;</p>
<p>// =============================================================================</p>
<p>//main-Funktion</p>
<p>int main()<br />
{<br />
string Arbeiter,Arbeit,Antwort,Arbeiter_n,suchwort;<br />
int Stunden_von,Minuten_von,Stunden_bis,Minuten_bis,Antwort1,neuArbeiter,Arbeiter_2,Passwort;</p>
<p>start: cout&lt;&lt; &quot;Arbeitsoperator 1.0\n\n\n&quot;;</p>
<p>cout&lt;&lt; &quot;Waehlen sie eine Option:\n\n&quot;;<br />
cout&lt;&lt; &quot; 1- Neuen Arbeiter erstellen\n&quot;;<br />
cout&lt;&lt; &quot; 2- Arbeit eingeben\n\n&quot;;<br />
cout&lt;&lt; &quot;==============================\n&quot;;<br />
cout&lt;&lt; &quot; 3- Info\n&quot;;</p>
<p>cin&gt;&gt; Antwort1;<br />
// =============================================================================<br />
if (Antwort1 == &quot;1&quot;)<br />
{<br />
cout&lt;&lt; &quot;Geben sie bitte das Passwort ein:\n&quot;;<br />
cin&gt;&gt; Passwort;</p>
<p>if (Passwort == &quot;becker569&quot;)<br />
{</p>
<p>cout&lt;&lt; &quot;Geben sie bitte den Namen des Mitarbeiters den sie erstellen wollen&quot;;<br />
cout&lt;&lt; &quot;ein:\n&quot;;</p>
<p>cin&gt;&gt; neuArbeiter;</p>
<p>fstream f;<br />
f.open(&quot;Arbeiter.txt&quot;, ios::out | ios::ate |ios::app);<br />
f &lt;&lt; neuArbeiter&lt;&lt;&quot;\n&quot;;</p>
<p>f.close();</p>
<p>goto start;}<br />
// =============================================================================<br />
else<br />
{<br />
cout&lt;&lt; &quot;Sie haben ein falsches Passwort eingegeben!\n\n\n&quot;;<br />
cout&lt;&lt; &quot;Wenn sie das Passwort vergessen haben wenden sie sich an den Systemadministrator!\n&quot;;<br />
goto start;<br />
}<br />
}<br />
// =============================================================================<br />
if (Antwort==&quot;2&quot;)<br />
{</p>
<p>// Namen-Eingabe</p>
<p>cout&lt;&lt; &quot;Bitte geben sie ihren Namen ein (Max_Mustermann): &quot;;<br />
cin&gt;&gt;Arbeiter;</p>
<p>int position = text.find(Arbeiter, 0);}<br />
if (position != -1) {</p>
<p>// =============================================================================</p>
<p>// Schreib-Modul 1<br />
//------------------------------------------------------------------------------<br />
// Namen in Datei schreiben<br />
fstream f;<br />
f.open(&quot;Arbeit.txt&quot;, ios::out | ios::ate |ios::app);<br />
f &lt;&lt; Arbeiter&lt;&lt;&quot;\n\n&quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>// Uhrzeit-Eingabe</p>
<p>start2: cout&lt;&lt; &quot;Geben sie bitte die Uhrzeiten ein :\n&quot;;</p>
<p>cout&lt;&lt; &quot;Von:\n\n&quot;;</p>
<p>cout&lt;&lt; &quot;Stunde:\n&quot;;<br />
cin&gt;&gt; Stunden_von;</p>
<p>cout&lt;&lt; &quot;Minuten:\n&quot;;<br />
cin&gt;&gt; Minuten_von;</p>
<p>cout&lt;&lt; &quot;Bis:\n\n &quot;;</p>
<p>cout&lt;&lt; &quot;Stunden:\n &quot;;<br />
cin&gt;&gt; Stunden_bis;</p>
<p>cout&lt;&lt; &quot; Minuten:\n &quot;;<br />
cin&gt;&gt; Minuten_bis;</p>
<p>// =============================================================================</p>
<p>// Schreib-Modul 2</p>
<p>//------------------------------------------------------------------------------<br />
// Uhrzeit in Datei schreiben</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);<br />
f &lt;&lt;&quot;(&quot;&lt;&lt; Stunden_von&lt;&lt;&quot;:&quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);<br />
f &lt;&lt; Minuten_von&lt;&lt;&quot;Uhr bis &quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out |ios::app);<br />
f &lt;&lt; Stunden_bis&lt;&lt;&quot;:&quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);<br />
f &lt;&lt; Minuten_bis&lt;&lt;&quot;Uhr )\n\n\n &quot;;</p>
<p>f.close();</p>
<p>// =============================================================================</p>
<p>// Beschäftigung eingeben</p>
<p>cout&lt;&lt; &quot; Bitte geben sie ihre Beschaeftigung waehrend dieser Zeit ein(Mit Unterstrich): \n&quot;;<br />
cin&gt;&gt; Arbeit;</p>
<p>// Beschäftigung in Datei schreiben</p>
<p>f.open(&quot;Arbeit.txt&quot;, ios::out | ios::ate |ios::app);<br />
f &lt;&lt; Arbeit&lt;&lt;&quot;\n\n\n\n&quot;;</p>
<p>f.close();<br />
}<br />
// =============================================================================<br />
else<br />
{<br />
goto start;<br />
}</p>
<p>cout&lt;&lt;&quot;Wollen sie noch mehr eingeben? (ja/nein)&quot;;<br />
cin&gt;&gt;Antwort;</p>
<p>if (Antwort == &quot;ja&quot;) // If-Anweisung<br />
{<br />
goto start2;</p>
<p>}</p>
<p>else // Else-Anweisung (Beendet das Programm)<br />
{<br />
f.open(&quot;Arbeit.txt&quot;, ios::out |ios::app);<br />
f &lt;&lt; &quot;=====================================\n\n&quot;;</p>
<p>f.close();<br />
}</p>
<p>}}} // Schluss Klammern<br />
[cpp]</p>
<p>Ich weiss es sieht nicht gerade schön aus aber ich bitte um Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1101859</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1101859</guid><dc:creator><![CDATA[Kurth2]]></dc:creator><pubDate>Fri, 21 Jul 2006 14:13:59 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Fri, 21 Jul 2006 14:19:20 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Keine Ahnung, ob ich gerade einen Troll füttere, aber benutz bitte Code-Tags und schreib, was es für einen Fehler gibt. Auf jeden Fall solltest du aus:</p>
<pre><code class="language-cpp">&lt;iostream.h&gt;
</code></pre>
<p>unbedingt</p>
<pre><code class="language-cpp">&lt;iostream&gt;
</code></pre>
<p>machen und dann daran denken, dass jetzt einiges im</p>
<pre><code class="language-cpp">namespace std
</code></pre>
<p>liegt</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1101861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1101861</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 21 Jul 2006 14:19:20 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Fri, 21 Jul 2006 14:19:31 GMT]]></title><description><![CDATA[<p>Klar.</p>
<p>- CPP-Tags beendet man mit [/ cpp]<br />
- goto ist böse<br />
- ich finde keine Problembeschreibung</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1101862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1101862</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Fri, 21 Jul 2006 14:19:31 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Fri, 21 Jul 2006 14:30:17 GMT]]></title><description><![CDATA[<h1>32:2<br />
\Dev-Cpp\include\c++\3.4.2\backward\backward_warning.h #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the &lt;X&gt; header for the &lt;X.h&gt; header for C++ includes, or &lt;iostream&gt; instead of the deprecated header &lt;iostream.h&gt;.</h1>
<h1>36<br />
\Unit1.cpp ISO C++ forbids comparison between pointer and integer</h1>
<h1>41<br />
\Unit1.cpp ISO C++ forbids comparison between pointer and integer</h1>
<h1>76<br />
\Unit1.cpp `text' undeclared (first use this function)</h1>
<h1>77<br />
\Unit1.cpp `position' undeclared (first use this function)</h1>
<h1>105<br />
\Unit1.cpp jump to label `start2'</h1>
<h1>186<br />
\Unit1.cpp from here</h1>
<h1>95<br />
\Unit1.cpp skips initialization of `std::fstream f'</h1>
<h1>193<br />
\Unit1.cpp `f' undeclared (first use this function)</h1>
<h1>193<br />
\Unit1.cpp At global scope:</h1>
<p>200<br />
\Unit1.cpp expected declaration before '}' token</p>
<h1>=============================================================================<br />
00000000000000000000000000000000000000000000000000000000000000000000000000000</h1>
<p>Hier mal die Fehlermeldungen <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="😃"
    /> Sry das ich sie vergessen habe *Böser Junge* <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="😡"
    /> <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="😡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_down"
      title=":-1:"
      alt="👎"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1101876</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1101876</guid><dc:creator><![CDATA[Kurth2]]></dc:creator><pubDate>Fri, 21 Jul 2006 14:30:17 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Fri, 21 Jul 2006 14:49:26 GMT]]></title><description><![CDATA[<p>Antwort1 und Passwort sind bei dir int und du vergleichst mit einem String.<br />
mach strings draus<br />
text ganz unten ist nicht deklariert<br />
Die zweite Verwendung von position ist nach der Klammer d.h. die Variable ist nicht mehr gültig.</p>
<p>Bitte versuch doch einfach mal die Fehlermeldungen zu verstehen. Da steht doch alles.<br />
Wenn du deinen Code ordentlich formatierst findest du schon was.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1101888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1101888</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 21 Jul 2006 14:49:26 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Fri, 21 Jul 2006 15:18:21 GMT]]></title><description><![CDATA[<p>Erstmal danke für deine Hilfe. Aber kannst du oder ein anderer mir eine verbesserte Version des Quellcodes ins Forum posten? Ich wäre euch sehr dankbar. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1101895</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1101895</guid><dc:creator><![CDATA[Kurth2]]></dc:creator><pubDate>Fri, 21 Jul 2006 15:18:21 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Fri, 21 Jul 2006 16:26:01 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Kurth2 schrieb:</p>
<blockquote>
<p>Erstmal danke für deine Hilfe. Aber kannst du oder ein anderer mir eine verbesserte Version des Quellcodes ins Forum posten? Ich wäre euch sehr dankbar. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
</blockquote>
<p>Auch wenn es nervt, solltest du mal versuchen den Code selber zu verbessern und dann eventuell deine neue Version wieder im Forum zeigen, falls du weiterhin Probleme hast.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1101924</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1101924</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 21 Jul 2006 16:26:01 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Sat, 22 Jul 2006 14:54:14 GMT]]></title><description><![CDATA[<p>@Kurth2:</p>
<ol>
<li>Formatierung in Ordnung bringen</li>
<li>Sinnlosen Freiraum streichen</li>
<li>Fehler selbst angehen (zumindest fehlende Deklarationen)</li>
<li>Fragen zu Problemen stellen</li>
</ol>
]]></description><link>https://www.c-plusplus.net/forum/post/1102276</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1102276</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Sat, 22 Jul 2006 14:54:14 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Wed, 26 Jul 2006 12:30:50 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt; 
#include &lt;fstream&gt;
#include &lt;string&gt; 
using namespace std; 

int main(int argc, char *argv[]) 
{ 
    fstream f; 
    f.open(&quot;Pass.dll&quot;, ios::out); 
    f &lt;&lt; &quot;Passwort&quot; &lt;&lt; endl; 
    f.close(); 

   string input ; // C++ String 
   cout &lt;&lt; &quot;Bitte Passwort eingeben:&quot; &lt;&lt; std::endl; // Ausgabe mit C++ Mitteln 
   cin &gt;&gt; input; // Eingabe mnit C++ Mitteln 
   ifstream file(&quot;Pass.dll&quot;); 
   string password; 
   file &gt;&gt; password; // richtiges Password aus Datei lesen 
   if (password == input) // Eingabe und Passwort vergleichen 
  { cout &lt;&lt; &quot;Passwort richtig&quot;; 

// =============================================================================

string Arbeiter,Arbeit,Antwort,Arbeiter_n,suchwort,Passwort,Antwort1;
int Stunden_von,Minuten_von,Stunden_bis,Minuten_bis,neuArbeiter,Arbeiter_2;

 cout&lt;&lt; &quot;Arbeitsoperator 1.0\n\n\n&quot;;

// Namen-Eingabe

cout&lt;&lt; &quot;Bitte geben sie ihren Namen ein (Max_Mustermann): &quot;;
cin&gt;&gt;Arbeiter;

// =============================================================================

// Schreib-Modul 1
//------------------------------------------------------------------------------
// Namen in Datei schreiben
    fstream f;
    f.open(&quot;Arbeit.txt&quot;, ios::out | ios::ate |ios::app);
    f &lt;&lt; Arbeiter&lt;&lt;&quot;\n\n&quot;;

    f.close();

// =============================================================================

// Uhrzeit-Eingabe

start: cout&lt;&lt; &quot;Geben sie bitte die Uhrzeiten ein :\n&quot;;  

       cout&lt;&lt; &quot;Von:\n\n&quot;; 

       cout&lt;&lt; &quot;Stunde:\n&quot;;
       cin&gt;&gt; Stunden_von;

       cout&lt;&lt; &quot;Minuten:\n&quot;;
       cin&gt;&gt; Minuten_von;

       cout&lt;&lt; &quot;Bis:\n\n &quot;;

       cout&lt;&lt; &quot;Stunden:\n &quot;;
       cin&gt;&gt; Stunden_bis;

       cout&lt;&lt; &quot; Minuten:\n &quot;;
       cin&gt;&gt; Minuten_bis;

// =============================================================================       

// Schreib-Modul 2

//------------------------------------------------------------------------------
// Uhrzeit in Datei schreiben   

    f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);
    f &lt;&lt;&quot;(&quot;&lt;&lt; Stunden_von&lt;&lt;&quot;:&quot;;

    f.close();

// =============================================================================

    f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);
    f &lt;&lt; Minuten_von&lt;&lt;&quot;Uhr bis &quot;;

    f.close();
}
// =============================================================================
{
    f.open(&quot;Arbeit.txt&quot;, ios::out |ios::app);
    f &lt;&lt; Stunden_bis&lt;&lt;&quot;:&quot;;

    f.close();

    f.open(&quot;Arbeit.txt&quot;, ios::out | ios::app);
    f &lt;&lt; Minuten_bis&lt;&lt;&quot;Uhr )\n\n\n &quot;;

    f.close();

// =============================================================================

// Beschäftigung eingeben

cout&lt;&lt; &quot; Bitte geben sie ihre Beschaeftigung waehrend dieser Zeit ein(Mit Unterstrich): \n&quot;;
cin&gt;&gt; Arbeit;

// Beschäftigung in Datei schreiben

 f.open(&quot;Arbeit.txt&quot;, ios::out | ios::ate |ios::app);
    f &lt;&lt; Arbeit&lt;&lt;&quot;\n\n\n\n&quot;;

    f.close();

// =============================================================================

cout&lt;&lt;&quot;Wollen sie noch mehr eingeben? (ja/nein)&quot;;
cin&gt;&gt;Antwort;

if (Antwort == &quot;ja&quot;)    // If-Anweisung
{
   goto start;

}

else    // Else-Anweisung (Beendet das Programm)
{
    f.open(&quot;Arbeit.txt&quot;, ios::out |ios::app);
    f &lt;&lt; &quot;=====================================\n\n&quot;;

    f.close();
 }

}}  }// Schluss Klammern
 else 
     cout &lt;&lt; &quot;Passworf falsch&quot;; 

   system(&quot;pause&quot;); 
    return EXIT_SUCCESS; 
} }
</code></pre>
<p>Hier ist die verbesserte Version. Aber es gibt immer noch Fehler.<br />
Hier mal die Fehlerliste.</p>
<p>\Unbenannt2.cpp In function `int main(int, char**)':</p>
<p>98 \Unbenannt2.cpp `Stunden_bis' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)</p>
<p>103 \Unbenannt2.cpp `Minuten_bis' undeclared (first use this function)</p>
<p>112 \Unbenannt2.cpp `Arbeit' undeclared (first use this function)</p>
<p>125 \Unbenannt2.cpp `Antwort' undeclared (first use this function)</p>
<p>54 \Unbenannt2.cpp jump to label `start'</p>
<p>129 \Unbenannt2.cpp from here</p>
<p>28 \Unbenannt2.cpp skips initialization of `std::string Arbeiter'</p>
<p>28 \Unbenannt2.cpp skips initialization of `std::string Arbeit'</p>
<p>28 \Unbenannt2.cpp skips initialization of `std::string Antwort'</p>
<p>28 \Unbenannt2.cpp skips initialization of `std::string Arbeiter_n'</p>
<p>28 \Unbenannt2.cpp skips initialization of `std::string suchwort'</p>
<p>28 \Unbenannt2.cpp skips initialization of `std::string Passwort'</p>
<p>28 \Unbenannt2.cpp skips initialization of `std::string Antwort1'</p>
<p>44 \Unbenannt2.cpp skips initialization of `std::fstream f'</p>
<p>44 \Unbenannt2.cpp At global scope:</p>
<p>143 \Unbenannt2.cpp expected declaration before '}' token</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104559</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104559</guid><dc:creator><![CDATA[Kurth2]]></dc:creator><pubDate>Wed, 26 Jul 2006 12:30:50 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir mal einer helfen? on Wed, 26 Jul 2006 13:33:59 GMT]]></title><description><![CDATA[<p>Deine Fehler beruhen alle auf fehlerhafter Klammerung. Wenn du ordenlich klammerst und einrückst siehst du das sofort.<br />
Etwa so (nur ein Beispiel)</p>
<pre><code class="language-cpp">if( ... )
{
   // hier der neue Text
   if( ... )
   {
       // wieder neuer Text
   }
}
</code></pre>
<p>usw.<br />
Zieh das konsequent durch und du findest deine Fehler sofort. Lass bitte auch die gotos weg. Für sowas gibt es if oder while.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104628</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104628</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 26 Jul 2006 13:33:59 GMT</pubDate></item></channel></rss>