<?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[wie kann ich wieder zurückspringen]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;

using namespace std;

float ergebnissadd (float, float);		//Erzeugung der Funktionen
float ergebnisssub (float, float);
float ergebnissmulti (float, float);
float ergebnissdivi (float, float);

int main()
{
	cout &lt;&lt; &quot;Was moechten Sie tun ?\n&quot;&lt;&lt;endl;
	cout &lt;&lt; &quot;Moechten Sie addieren, subtrahiren, multiplizieren oder dividieren ?\n&quot;&lt;&lt;endl;
	cout &lt;&lt; &quot;Bitte geben Sie den ensprechenden Anfngsbuchstaben ein : &quot;;
	char vote;

	cin &gt;&gt; vote;
	cout &lt;&lt; endl;
	if (vote == 'a'or'd'or'm'or's')		//Abfrage, was man machen will

		if (vote == 'a')		//addieren
		{
			cout &lt;&lt; &quot;Sie moechten also addieren !\n&quot;&lt;&lt;endl;
			cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
			float erstezahl;
			cin &gt;&gt; erstezahl;
			cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
			float zweitezahl;
			cin &gt;&gt; zweitezahl;

			float ergebniss;
			ergebniss = ergebnissadd (erstezahl, zweitezahl);

			cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl;

			return 0;
		}

			else if (vote == 's')		//subtrahieren
			{
				cout &lt;&lt; &quot;Sie moechten also subtrahieren !\n&quot;&lt;&lt;endl;
				cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
				float erstezahl;
				cin &gt;&gt; erstezahl;
				cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
				float zweitezahl;
				cin &gt;&gt; zweitezahl;

				float ergebniss;
				ergebniss = ergebnisssub (erstezahl, zweitezahl);

				cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl;

				return 0;
			}

				else if (vote == 'm')		//multiplizieren
				{
					cout &lt;&lt; &quot;Sie moechten also multiplizieren !\n&quot;&lt;&lt;endl;
					cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
					float erstezahl;
					cin &gt;&gt; erstezahl;
					cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
					float zweitezahl;
					cin &gt;&gt; zweitezahl;

					float ergebniss;
					ergebniss = ergebnissmulti (erstezahl, zweitezahl);

					cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl;

					return 0;
				}

					else if (vote == 'd')		//dividieren
					{
						cout &lt;&lt; &quot;Sie moechten also dividieren !\n&quot;&lt;&lt;endl;
						cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
						float erstezahl;
						cin &gt;&gt; erstezahl;
						cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
						float zweitezahl;
						cin &gt;&gt; zweitezahl;

						float ergebniss;
						ergebniss = ergebnissdivi (erstezahl, zweitezahl);

						cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n\n&quot;&lt;&lt;endl;

						return 0;
					}

	else
		cout &lt;&lt; &quot;\nKeine zulaessige Angabe.&quot;;
	getch ();
	return 0;
}

float ergebnissadd (float x, float y)		//abschliessend die 4 Funktonen
{
	return (x + y);
}

float ergebnisssub (float x, float y)
{
	return (x - y);
}

float ergebnissmulti (float x, float y)
{
	return (x * y);
}

float ergebnissdivi (float x, float y)
{
	return (x / y);
}
</code></pre>
<p>Ich möchte nach jeder rechnung wieder zu &quot;vote&quot; springen, um das Programm<br />
wieder von neuem zu beginnen.<br />
Bin ein blutiger Anfänger. Dass <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="😉"
    /> und noch ein paar andere Sachen, sind<br />
nach 2 Wochen hängen geblieben. Bin für jegliche Kritik offen.</p>
<p>vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/186192/wie-kann-ich-wieder-zurückspringen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 07:57:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/186192.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 06 Jul 2007 01:58:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 01:58:36 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt;

using namespace std;

float ergebnissadd (float, float);		//Erzeugung der Funktionen
float ergebnisssub (float, float);
float ergebnissmulti (float, float);
float ergebnissdivi (float, float);

int main()
{
	cout &lt;&lt; &quot;Was moechten Sie tun ?\n&quot;&lt;&lt;endl;
	cout &lt;&lt; &quot;Moechten Sie addieren, subtrahiren, multiplizieren oder dividieren ?\n&quot;&lt;&lt;endl;
	cout &lt;&lt; &quot;Bitte geben Sie den ensprechenden Anfngsbuchstaben ein : &quot;;
	char vote;

	cin &gt;&gt; vote;
	cout &lt;&lt; endl;
	if (vote == 'a'or'd'or'm'or's')		//Abfrage, was man machen will

		if (vote == 'a')		//addieren
		{
			cout &lt;&lt; &quot;Sie moechten also addieren !\n&quot;&lt;&lt;endl;
			cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
			float erstezahl;
			cin &gt;&gt; erstezahl;
			cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
			float zweitezahl;
			cin &gt;&gt; zweitezahl;

			float ergebniss;
			ergebniss = ergebnissadd (erstezahl, zweitezahl);

			cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl;

			return 0;
		}

			else if (vote == 's')		//subtrahieren
			{
				cout &lt;&lt; &quot;Sie moechten also subtrahieren !\n&quot;&lt;&lt;endl;
				cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
				float erstezahl;
				cin &gt;&gt; erstezahl;
				cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
				float zweitezahl;
				cin &gt;&gt; zweitezahl;

				float ergebniss;
				ergebniss = ergebnisssub (erstezahl, zweitezahl);

				cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl;

				return 0;
			}

				else if (vote == 'm')		//multiplizieren
				{
					cout &lt;&lt; &quot;Sie moechten also multiplizieren !\n&quot;&lt;&lt;endl;
					cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
					float erstezahl;
					cin &gt;&gt; erstezahl;
					cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
					float zweitezahl;
					cin &gt;&gt; zweitezahl;

					float ergebniss;
					ergebniss = ergebnissmulti (erstezahl, zweitezahl);

					cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl;

					return 0;
				}

					else if (vote == 'd')		//dividieren
					{
						cout &lt;&lt; &quot;Sie moechten also dividieren !\n&quot;&lt;&lt;endl;
						cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;;
						float erstezahl;
						cin &gt;&gt; erstezahl;
						cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;;
						float zweitezahl;
						cin &gt;&gt; zweitezahl;

						float ergebniss;
						ergebniss = ergebnissdivi (erstezahl, zweitezahl);

						cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n\n&quot;&lt;&lt;endl;

						return 0;
					}

	else
		cout &lt;&lt; &quot;\nKeine zulaessige Angabe.&quot;;
	getch ();
	return 0;
}

float ergebnissadd (float x, float y)		//abschliessend die 4 Funktonen
{
	return (x + y);
}

float ergebnisssub (float x, float y)
{
	return (x - y);
}

float ergebnissmulti (float x, float y)
{
	return (x * y);
}

float ergebnissdivi (float x, float y)
{
	return (x / y);
}
</code></pre>
<p>Ich möchte nach jeder rechnung wieder zu &quot;vote&quot; springen, um das Programm<br />
wieder von neuem zu beginnen.<br />
Bin ein blutiger Anfänger. Dass <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="😉"
    /> und noch ein paar andere Sachen, sind<br />
nach 2 Wochen hängen geblieben. Bin für jegliche Kritik offen.</p>
<p>vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319318</guid><dc:creator><![CDATA[newbi2]]></dc:creator><pubDate>Fri, 06 Jul 2007 01:58:36 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 02:50:24 GMT]]></title><description><![CDATA[<p>ne schleife (do - while) drumrum.</p>
<p>allen code der doppelt ist in funktionen packen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319322</guid><dc:creator><![CDATA[wir sind es immer so]]></dc:creator><pubDate>Fri, 06 Jul 2007 02:50:24 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 04:35:03 GMT]]></title><description><![CDATA[<p>?? was ist das??</p>
<pre><code class="language-cpp">if (vote == 'a'or'd'or'm'or's')
</code></pre>
<p>hab soe in &quot;or&quot; noch nie gesehen...</p>
<p>Zurückspringen:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 
#include &lt;conio.h&gt; 

using namespace std; 

float ergebnissadd (float, float);        //Erzeugung der Funktionen 
float ergebnisssub (float, float); 
float ergebnissmulti (float, float); 
float ergebnissdivi (float, float); 

int main() 
{ 
      char vote; 

      do{   
       cout &lt;&lt; &quot;Was moechten Sie tun ?\n&quot;&lt;&lt;endl; 
       cout &lt;&lt; &quot;Moechten Sie addieren, subtrahiren, multiplizieren oder 
       dividieren ?\n&quot;&lt;&lt;endl; 

       cout &lt;&lt; &quot;Bitte geben Sie den ensprechenden Anfngsbuchstaben ein (e für  EXIT): &quot;; 

       cin &gt;&gt; vote; 
       cout &lt;&lt; endl; 

        if (vote == 'a')        //addieren 
        { 
            cout &lt;&lt; &quot;Sie moechten also addieren !\n&quot;&lt;&lt;endl; 
            cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
            float erstezahl; 
            cin &gt;&gt; erstezahl; 
            cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
            float zweitezahl; 
            cin &gt;&gt; zweitezahl; 

            float ergebniss; 
            ergebniss = ergebnissadd (erstezahl, zweitezahl); 

            cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl; 

            return 0; 
        } 

            else if (vote == 's')        //subtrahieren 
            { 
                cout &lt;&lt; &quot;Sie moechten also subtrahieren !\n&quot;&lt;&lt;endl; 
                cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
                float erstezahl; 
                cin &gt;&gt; erstezahl; 
                cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
                float zweitezahl; 
                cin &gt;&gt; zweitezahl; 

                float ergebniss; 
                ergebniss = ergebnisssub (erstezahl, zweitezahl); 

                cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl; 

                return 0; 
            } 

                else if (vote == 'm')        //multiplizieren 
                { 
                    cout &lt;&lt; &quot;Sie moechten also multiplizieren !\n&quot;&lt;&lt;endl; 
                    cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
                    float erstezahl; 
                    cin &gt;&gt; erstezahl; 
                    cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
                    float zweitezahl; 
                    cin &gt;&gt; zweitezahl; 

                    float ergebniss; 
                    ergebniss = ergebnissmulti (erstezahl, zweitezahl); 

                    cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl; 

                    return 0; 
                } 

                    else if (vote == 'd')        //dividieren 
                    { 
                        cout &lt;&lt; &quot;Sie moechten also dividieren !\n&quot;&lt;&lt;endl; 
                        cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
                        float erstezahl; 
                        cin &gt;&gt; erstezahl; 
                        cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
                        float zweitezahl; 
                        cin &gt;&gt; zweitezahl; 

                        float ergebniss; 
                        ergebniss = ergebnissdivi (erstezahl, zweitezahl); 

                        cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n\n&quot;&lt;&lt;endl; 

                        return 0; 
                    } 
                    else 
                      cout &lt;&lt; &quot;\nKeine zulaessige Angabe.&quot;; 

   }while(vote != 'e'); // e für EXIT 

     return 0; 
} 

float ergebnissadd (float x, float y)        //abschliessend die 4 Funktonen 
{ 
    return (x + y); 
} 

float ergebnisssub (float x, float y) 
{ 
    return (x - y); 
} 

float ergebnissmulti (float x, float y) 
{ 
    return (x * y); 
} 

float ergebnissdivi (float x, float y) 
{ 
    return (x / y); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1319323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319323</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 06 Jul 2007 04:35:03 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 06:30:00 GMT]]></title><description><![CDATA[<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>?? was ist das??</p>
<pre><code class="language-cpp">if (vote == 'a'or'd'or'm'or's')
</code></pre>
<p>hab soe in &quot;or&quot; noch nie gesehen...</p>
</blockquote>
<p>In irgendeinem der Standard-Header stehen solche defines wie 'or' (für ||) oder 'and' (für &amp;&amp;) drin - für Leute, denen die normalen Operatoren zu kryptisch aussehen <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1319364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319364</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 06 Jul 2007 06:30:00 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 06:37:06 GMT]]></title><description><![CDATA[<p>werden dann die &quot;or&quot; und &quot;and&quot; auch so schön blau angezeigt wen sie nur defins sind?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319367</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 06 Jul 2007 06:37:06 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 06:39:55 GMT]]></title><description><![CDATA[<p>CStoll schrieb:</p>
<blockquote>
<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>?? was ist das??</p>
<pre><code class="language-cpp">if (vote == 'a'or'd'or'm'or's')
</code></pre>
<p>hab soe in &quot;or&quot; noch nie gesehen...</p>
</blockquote>
<p>In irgendeinem der Standard-Header stehen solche defines wie 'or' (für ||) oder 'and' (für &amp;&amp;) drin - für Leute, denen die normalen Operatoren zu kryptisch aussehen <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>
</blockquote>
<p>Die im Standard definierten Operatoren and, bitor, or, xor, compl, bitand, and_eq, or_eq, xor_eq, not, not_eq sind doch alternative Token. Müssen also nicht zwangsläufig über Macros implementiert sein, oder?</p>
<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>werden dann die &quot;or&quot; und &quot;and&quot; auch so schön blau angezeigt wen sie nur defins sind?</p>
</blockquote>
<p>Weil sie zum Umfang der C++ - Schlüsselwörter gehören.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319370</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319370</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Fri, 06 Jul 2007 06:39:55 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 06:40:06 GMT]]></title><description><![CDATA[<p>Mal ganz unqualifiziert und nicht zielführend:</p>
<p>Müsste man nicht:</p>
<pre><code class="language-cpp">vote == 'a' or vote == 'd' or // usw...
</code></pre>
<p>schreiben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319371</guid><dc:creator><![CDATA[Wirdbald]]></dc:creator><pubDate>Fri, 06 Jul 2007 06:40:06 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 06:42:04 GMT]]></title><description><![CDATA[<p>Hier ja, bei deinem heimischen Compiler vermutlich nicht <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>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/3880">@newbi</a>: Die Anweisung, über die Boris da gestolpert ist, ist übrigens sinnlos. Wenn du eine Variable mit mehreren Werten vergleichen willst, geht das nicht mit &quot;wert==v1||v2||...&quot;, sondern mit &quot;wer==v1||wert==v2||...&quot; (deine Variante liefert <strong>immer</strong> true zurück, weil spätestens das 'd' einen Wert ungleich 0 hat).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319373</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 06 Jul 2007 06:42:04 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 06:44:15 GMT]]></title><description><![CDATA[<p>diese falsche if anweisung hab ich bei meinem korrektur code sowieso drausen gelassen.. weil sie quasie druch die nächsten vier IF's ersetzt wird..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319376</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 06 Jul 2007 06:44:15 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 06:49:34 GMT]]></title><description><![CDATA[<p>Wirdbald schrieb:</p>
<blockquote>
<p>Mal ganz unqualifiziert und nicht zielführend:</p>
<p>Müsste man nicht:</p>
<pre><code class="language-cpp">vote == 'a' or vote == 'd' or // usw...
</code></pre>
<p>schreiben?</p>
</blockquote>
<p>Genau!</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/10318">@CStoll</a>: Bei meinem heimischen Compiler ist das auch per define gelöst worden. Hier auf Arbeit allerdings nicht! ;-P</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319380</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Fri, 06 Jul 2007 06:49:34 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 08:01:50 GMT]]></title><description><![CDATA[<p>Danke für die schnelle Antwort.<br />
Ich habe Mal den geänderten Quellcode kopiet, und compiliert(gelinkt).<br />
Der erwartete Sprung, nach jedem Rechenschritt, zum Anfang, bleibt allerdings aus.</p>
<p>Ziel dieser Übung war es für mich,<br />
funktionsfähige &quot; Funktionsaufrufe und Schleifen &quot; zu erzeugen, um ein Gefühl dafür zu bekommen.</p>
<p>C++ ist doch einwenig schwerer zu lernen, als ich erwartet hatte. <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>Übrigens, ich benutze das MiniGW Developer Studio als Editor, Compiler, Linker.</p>
<p>Ist mein Lernfortschritt normal ??? Bin ja gerade erst 2 Wochen an C++ drann <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319423</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319423</guid><dc:creator><![CDATA[newbi2]]></dc:creator><pubDate>Fri, 06 Jul 2007 08:01:50 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 08:08:06 GMT]]></title><description><![CDATA[<p>In dieser Lernphase ist es vielleicht übertrieben, so ein großes Projekt anzufangen. Du solltest lieber von einem kleinen Hauptprogramm ausgehen ( <code>int main(){return 0;}</code> ) und das dann stückweise erweitern, das ist wesentlich leichter als einem vorgefertigten Haufen Spaghetti-Code Struktur geben zu wollen <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/1319428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319428</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 06 Jul 2007 08:08:06 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 08:13:09 GMT]]></title><description><![CDATA[<p>jepp hab übersehen das du bei jeder ifanweiseung ein &quot;return 0;&quot; machst.. was natürlich dazu führt das das programm immer weider beenden wird...</p>
<p>jetzt müsste es klappen:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 
#include &lt;conio.h&gt; 

using namespace std; 

float ergebnissadd (float, float);        //Erzeugung der Funktionen 
float ergebnisssub (float, float); 
float ergebnissmulti (float, float); 
float ergebnissdivi (float, float); 

int main() 
{ 
      char vote; 

      do{   
       cout &lt;&lt; &quot;Was moechten Sie tun ?\n&quot;&lt;&lt;endl; 
       cout &lt;&lt; &quot;Moechten Sie addieren, subtrahiren, multiplizieren oder 
       dividieren ?\n&quot;&lt;&lt;endl; 

       cout &lt;&lt; &quot;Bitte geben Sie den ensprechenden Anfngsbuchstaben ein (e für  EXIT): &quot;; 

       cin &gt;&gt; vote; 
       cout &lt;&lt; endl; 

        if (vote == 'a')        //addieren 
        { 
            cout &lt;&lt; &quot;Sie moechten also addieren !\n&quot;&lt;&lt;endl; 
            cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
            float erstezahl; 
            cin &gt;&gt; erstezahl; 
            cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
            float zweitezahl; 
            cin &gt;&gt; zweitezahl; 

            float ergebniss; 
            ergebniss = ergebnissadd (erstezahl, zweitezahl); 

            cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl; 

        } 

            else if (vote == 's')        //subtrahieren 
            { 
                cout &lt;&lt; &quot;Sie moechten also subtrahieren !\n&quot;&lt;&lt;endl; 
                cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
                float erstezahl; 
                cin &gt;&gt; erstezahl; 
                cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
                float zweitezahl; 
                cin &gt;&gt; zweitezahl; 

                float ergebniss; 
                ergebniss = ergebnisssub (erstezahl, zweitezahl); 

                cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl; 

            } 

                else if (vote == 'm')        //multiplizieren 
                { 
                    cout &lt;&lt; &quot;Sie moechten also multiplizieren !\n&quot;&lt;&lt;endl; 
                    cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
                    float erstezahl; 
                    cin &gt;&gt; erstezahl; 
                    cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
                    float zweitezahl; 
                    cin &gt;&gt; zweitezahl; 

                    float ergebniss; 
                    ergebniss = ergebnissmulti (erstezahl, zweitezahl); 

                    cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n&quot;&lt;&lt;endl; 

                } 

                    else if (vote == 'd')        //dividieren 
                    { 
                        cout &lt;&lt; &quot;Sie moechten also dividieren !\n&quot;&lt;&lt;endl; 
                        cout &lt;&lt; &quot;Bitte geben Sie die erste Zahl ein : &quot;; 
                        float erstezahl; 
                        cin &gt;&gt; erstezahl; 
                        cout &lt;&lt; &quot;\nBitte geben Sie nun die zweite Zahl ein : &quot;; 
                        float zweitezahl; 
                        cin &gt;&gt; zweitezahl; 

                        float ergebniss; 
                        ergebniss = ergebnissdivi (erstezahl, zweitezahl); 

                        cout &lt;&lt; &quot;\n\nDas Ergebniss ist : &quot; &lt;&lt; ergebniss &lt;&lt; &quot;\n\n&quot;&lt;&lt;endl; 

                    } 
                    else 
                      cout &lt;&lt; &quot;\nKeine zulaessige Angabe.&quot;; 

   }while(vote != 'e'); // e für EXIT 

     return 0; 
} 

float ergebnissadd (float x, float y)        //abschliessend die 4 Funktonen 
{ 
    return (x + y); 
} 

float ergebnisssub (float x, float y) 
{ 
    return (x - y); 
} 

float ergebnissmulti (float x, float y) 
{ 
    return (x * y); 
} 

float ergebnissdivi (float x, float y) 
{ 
    return (x / y); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1319431</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319431</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Fri, 06 Jul 2007 08:13:09 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 08:20:18 GMT]]></title><description><![CDATA[<p>Ist &quot;do - while&quot; so wie es da steht nicht ungünstig? wenn ich &quot;e&quot; eingebe, schreibt das Prog theoretisch immer &quot;keine zulässige Eingabe&quot; vor dem Beenden der Schleife.</p>
<p>Oder vielleicht einfach:</p>
<pre><code class="language-cpp">else if (vote != 'e')
cout &lt;&lt; &quot;\nKeine zulaessige Angabe.&quot;;

//anstelle von:

else
cout &lt;&lt; &quot;\nKeine zulaessige Angabe.&quot;;
</code></pre>
<p>Aber das nur am Rande.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319438</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319438</guid><dc:creator><![CDATA[Kolumbus]]></dc:creator><pubDate>Fri, 06 Jul 2007 08:20:18 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 08:24:43 GMT]]></title><description><![CDATA[<p>Hab mich nun endlich auch im Board registriert.<br />
Und schwupps !!! aus newbi2 wurde sunnysk <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="🙂"
    /></p>
<p>Übrigens, das hab ich nicht einfach kopiert. Ich hab mir das alles selber ausgedacht, und aus dem Kopf heraus geschrieben.</p>
<p>Nur mit dem zurückspringen habe ich es noch nicht so. Die Befehle dafür kamen noch nicht in meinem Buch. Ich wollte halt schnell ein Ergebniss <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>
<p>Funzt super !!!<br />
Und wieder etwas gelernt.</p>
<p>Vielen Dank !!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1319442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319442</guid><dc:creator><![CDATA[sunnysk]]></dc:creator><pubDate>Fri, 06 Jul 2007 08:24:43 GMT</pubDate></item><item><title><![CDATA[Reply to wie kann ich wieder zurückspringen on Fri, 06 Jul 2007 08:37:26 GMT]]></title><description><![CDATA[<p>Mal zwei Dinge, die mir hier in den Augen brennen:</p>
<p>1. Du kannst da eine ganze Menge Zeugs in Funktionen auslagern, um die Schleife übersichtlicher zu machen. Zum Beispiel bietet sich eine Funktion zwei_zahlen_einlesen an, z.B. ungefähr so:</p>
<pre><code class="language-cpp">void zwei_zahlen_einlesen(float&amp; zahl1, float&amp; zahl2)
{
    cout &lt;&lt; &quot;Bitte die erste Zahl eingeben:&quot; &lt;&lt; endl;
    cin &gt;&gt; zahl1;
    // weiterer Code
}
</code></pre>
<p>2. Die Schleife schreit ganz doll danach, von if, else &amp; Co. befreit zu werden. Sie möchte gerne eine Switch-Anweisung haben. Ich habe das mal aus einem anderen Thread rüberkopiert:</p>
<pre><code class="language-cpp">do{
   cin&gt;&gt;abfrage;

    switch(abfrage)
    {
        case 1:
        cout&lt;&lt;&quot;Geben sie ein neue Zahl ein&quot;&lt;&lt;endl;
        cout&lt;&lt;endl;
        cin&gt;&gt;in_Liste;
        eineMenge.hinzufuegen(in_Liste);
        break;

        case 2:
        cout&lt;&lt;&quot;Geben sie das zu entfernede Element ein&quot;&lt;&lt;endl;
        cout&lt;&lt;endl;
        cin&gt;&gt;in_Liste;
        eineMenge.entfernen(in_Liste);
        break;

        case 3:
        cout&lt;&lt;&quot;Geben sie das zupruefende Element ein&quot;&lt;&lt;endl;
        cout&lt;&lt;endl;
        cin&gt;&gt;in_Liste;
        eineMenge.istvorhanden(in_Liste);
        break;

        case 4:
        eineMenge.size();
        break;
    }
}while(abfrage!=5);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1319453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1319453</guid><dc:creator><![CDATA[Wirdbald]]></dc:creator><pubDate>Fri, 06 Jul 2007 08:37:26 GMT</pubDate></item></channel></rss>