<?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[Hilfe mit meinem ersten C++ Programm]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
using namespace std;

int OpAdd()
{
	cout&lt;&lt;&quot;Enter a number to add.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to add.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne+NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpSub()
{
	cout&lt;&lt;&quot;Enter a number to subtract.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to subtract.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne-NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpMulti()
{
	cout&lt;&lt;&quot;Enter a number to multiply.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to multiply.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne*NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpDiv()
{
	cout&lt;&lt;&quot;Enter a number to divide.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to divide.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne/NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpExit()
{
	cout&lt;&lt;&quot;Thanks for using UltraCalc2000!&quot;&lt;&lt;endl;
	system(&quot;pause&quot;);
	return 0;
}

int OpSelect()
{
	cout&lt;&lt;&quot;1)Add&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;2)Subtract&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;3)Multiply&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;4)Divide&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;5)Exit&quot;&lt;&lt;endl;
	cin &gt;&gt;OpMethod;

		if (OpMethod==1)
		{
			OpAdd
		}
		if (OpMethod==2)
		{
			OpSub
		}
		if (OpMethod==3)
		{
			OpMulti
		}
		if (OpMethod==4)
		{
			OpDiv
		}
		if (OpMethod==5)
		{
			OpExit
		}

int main()
{
	public long OpMethod,NumOne,NumTwo,NumResult;

	OpSelect
}
</code></pre>
<p>Beim Kompilieren gibt es 43 Fehler. Kann mir jemand bitte kurz sagen, wo die wichtigsten Fehler liegen? Die Funktionsaufrufe sind bestimmt falsch und die Variablen muss ich bestimmt auch anders deklarieren... aber wie? Danke! <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/topic/220222/hilfe-mit-meinem-ersten-c-programm</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 11:00:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/220222.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Aug 2008 11:23:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 11:23:13 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
using namespace std;

int OpAdd()
{
	cout&lt;&lt;&quot;Enter a number to add.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to add.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne+NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpSub()
{
	cout&lt;&lt;&quot;Enter a number to subtract.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to subtract.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne-NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpMulti()
{
	cout&lt;&lt;&quot;Enter a number to multiply.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to multiply.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne*NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpDiv()
{
	cout&lt;&lt;&quot;Enter a number to divide.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to divide.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne/NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect
}

int OpExit()
{
	cout&lt;&lt;&quot;Thanks for using UltraCalc2000!&quot;&lt;&lt;endl;
	system(&quot;pause&quot;);
	return 0;
}

int OpSelect()
{
	cout&lt;&lt;&quot;1)Add&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;2)Subtract&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;3)Multiply&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;4)Divide&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;5)Exit&quot;&lt;&lt;endl;
	cin &gt;&gt;OpMethod;

		if (OpMethod==1)
		{
			OpAdd
		}
		if (OpMethod==2)
		{
			OpSub
		}
		if (OpMethod==3)
		{
			OpMulti
		}
		if (OpMethod==4)
		{
			OpDiv
		}
		if (OpMethod==5)
		{
			OpExit
		}

int main()
{
	public long OpMethod,NumOne,NumTwo,NumResult;

	OpSelect
}
</code></pre>
<p>Beim Kompilieren gibt es 43 Fehler. Kann mir jemand bitte kurz sagen, wo die wichtigsten Fehler liegen? Die Funktionsaufrufe sind bestimmt falsch und die Variablen muss ich bestimmt auch anders deklarieren... aber wie? Danke! <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/1563919</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563919</guid><dc:creator><![CDATA[alberto2000]]></dc:creator><pubDate>Wed, 13 Aug 2008 11:23:13 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 11:26:36 GMT]]></title><description><![CDATA[<p>In deinen methoden hast du vergessen deine Variablen die du einlesen willst, mit den richtigen Datentypen zu deklarieren. Kann es sein das du aus der Java Ecker kommst? Bzw hast du dir mal ein Tutorial durchgelesen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1563922</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563922</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Wed, 13 Aug 2008 11:26:36 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 11:30:46 GMT]]></title><description><![CDATA[<p>Firefighter schrieb:</p>
<blockquote>
<p>In deinen methoden hast du vergessen deine Variablen die du einlesen willst, mit den richtigen Datentypen zu deklarieren. Kann es sein das du aus der Java Ecker kommst? Bzw hast du dir mal ein Tutorial durchgelesen?</p>
</blockquote>
<p>Was hat das mit Java zu tun?<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1563925</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563925</guid><dc:creator><![CDATA[simon.gysi]]></dc:creator><pubDate>Wed, 13 Aug 2008 11:30:46 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 11:31:23 GMT]]></title><description><![CDATA[<p>bin erst seit gestern bei c++, war davor nur mit visual basic unterwegs... darum die leichtfertigen fehler. heisst das, dass ich in jeder methode die variablen deklarieren muss? kann ich diese nicht in einem mal irgendwie global deklarieren? was ist sonst noch falsch im code? danke..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1563926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563926</guid><dc:creator><![CDATA[alberto2000]]></dc:creator><pubDate>Wed, 13 Aug 2008 11:31:23 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 11:34:26 GMT]]></title><description><![CDATA[<p>- lokale Variablen sind nur innerhalb eines {} Blockes bekannt.<br />
- lokale Variablen haben keinen Zugriffsspezifizierer public.<br />
- Funktionen ruft man mit Parametern in runden Klammern auf. Wenn die Funktion keine Parameter erwartet, mit einem leeren Klammernpaar ().<br />
- auch Anweisungen, die Funktionen aufrufen, werden mit Semikolon abgeschlossen</p>
<p>Auch mein Rat lautet: Arbeite ein Tutorial durch, welches Funktionen, Scopes, Parameter und Rückgabewerte abdeckt.</p>
<p>EDIT:<br />
Meines Wissens sind auch in VB lokale Variablen nur innerhalb eines Blockes, zumindest nur innerhalb der Sub oder Function, in der sie definiert wurden, bekannt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1563929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563929</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Wed, 13 Aug 2008 11:34:26 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 11:34:36 GMT]]></title><description><![CDATA[<p>@ simon</p>
<pre><code class="language-cpp">public long OpMethod,NumOne,NumTwo,NumResult
</code></pre>
<p>das hier hatte mich an java erinnert, aber wenn er sagt er kommt von vb, dann ist es mir auch klar.<br />
Naja globale Variablen sind immer schlecht, aber in VB leider gang und gebe, außer man programmiert ordentlich.<br />
Wenn du neue variablen in deinen funktionen benutzt, solltest du diese auch deklarieren sonst weiß der PC doch gar nicht wohin er was speichern soll?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1563932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563932</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Wed, 13 Aug 2008 11:34:36 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 11:44:18 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
using namespace std;

int OpAdd()
{
	long OpMethod,NumOne,NumTwo,NumResult;

	cout&lt;&lt;&quot;Enter a number to add.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to add.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne+NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect();
}

int OpSub()
{
	long OpMethod,NumOne,NumTwo,NumResult;

	cout&lt;&lt;&quot;Enter a number to subtract.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to subtract.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne-NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect();
}

int OpMulti()
{
	long OpMethod,NumOne,NumTwo,NumResult;

	cout&lt;&lt;&quot;Enter a number to multiply.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to multiply.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne*NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect();
}

int OpDiv()
{	
	long OpMethod,NumOne,NumTwo,NumResult;

	cout&lt;&lt;&quot;Enter a number to divide.&quot;;
	cin &gt;&gt;NumOne;
	cout&lt;&lt;&quot;Enter a second number to divide.&quot;;
	cin &gt;&gt;NumTwo;
	NumResult=NumOne/NumTwo;
	cout&lt;&lt;NumResult&lt;&lt;endl;
	cout&lt;&lt;&quot;\n&quot;;
	system(&quot;pause&quot;);
	OpSelect();
}

int OpExit()
{
	cout&lt;&lt;&quot;Thanks for using UltraCalc2000!&quot;&lt;&lt;endl;
	system(&quot;pause&quot;);
	return 0;
}

int OpSelect()
{
	long OpMethod,NumOne,NumTwo,NumResult;

	cout&lt;&lt;&quot;1)Add&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;2)Subtract&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;3)Multiply&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;4)Divide&quot;&lt;&lt;endl;
	cout&lt;&lt;&quot;5)Exit&quot;&lt;&lt;endl;
	cin &gt;&gt;OpMethod;

		if (OpMethod==1)
		{
			OpAdd();
		}
		if (OpMethod==2)
		{
			OpSub();
		}
		if (OpMethod==3)
		{
			OpMulti();
		}
		if (OpMethod==4)
		{
			OpDiv();
		}
		if (OpMethod==5)
		{
			OpExit();
		}
}

int main()
{
	OpSelect();
}
</code></pre>
<p>Danke für eure Hilfe und Geduld <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 />
Nun bekomme ich nur noch einen Fehler und zwar</p>
<blockquote>
<p>error C3861: &quot;OpSelect&quot;: Bezeichner wurde nicht gefunden.</p>
</blockquote>
<p>Was ist jetzt noch falsch? <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/1563940</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563940</guid><dc:creator><![CDATA[alberto2000]]></dc:creator><pubDate>Wed, 13 Aug 2008 11:44:18 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 12:20:48 GMT]]></title><description><![CDATA[<p>vor Deiner ersten Funktion (OpAdd) fehlt die Zeile</p>
<pre><code class="language-cpp">int OpSelect();
</code></pre>
<p>Stichwort: Prototype.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1563982</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1563982</guid><dc:creator><![CDATA[Airdamn]]></dc:creator><pubDate>Wed, 13 Aug 2008 12:20:48 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 14:15:41 GMT]]></title><description><![CDATA[<p>was bewirkt die zeile?<br />
wenn ich sie wie empfohlen einfüge, bekomme ich einige neue fehler beim builden, die besagen, dass die einzelnen funktionen einen wert zurückgeben müssen <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/1564099</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564099</guid><dc:creator><![CDATA[alberto2000]]></dc:creator><pubDate>Wed, 13 Aug 2008 14:15:41 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 14:17:17 GMT]]></title><description><![CDATA[<p>Ja ist richtig, wenn du den Funktionen schon einen int Rückgabewert gibts, wäre es nicht schlecht, diesen auch zurückzugeben <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1564101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564101</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Wed, 13 Aug 2008 14:17:17 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 14:39:52 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

long OpMethod,NumOne,NumTwo,NumResult;
string StrName;

void OpSelect();

void OpAdd()
{
	system(&quot;cls&quot;);
    cout&lt;&lt;&quot;Enter a number to add.&quot;;
    cin &gt;&gt;NumOne;
    cout&lt;&lt;&quot;Enter a second number to add.&quot;;
    cin &gt;&gt;NumTwo;
    NumResult=NumOne+NumTwo;
    cout&lt;&lt;&quot;The result is &quot;&lt;&lt;NumResult&lt;&lt;&quot;.&quot;&lt;&lt;endl;
    cout&lt;&lt;endl;
    system(&quot;pause&quot;);
    OpSelect();
}

void OpSub()
{
	system(&quot;cls&quot;);
    cout&lt;&lt;&quot;Enter a number to subtract.&quot;;
    cin &gt;&gt;NumOne;
    cout&lt;&lt;&quot;Enter a second number to subtract.&quot;;
    cin &gt;&gt;NumTwo;
    NumResult=NumOne-NumTwo;
    cout&lt;&lt;&quot;The result is &quot;&lt;&lt;NumResult&lt;&lt;&quot;.&quot;&lt;&lt;endl;
    cout&lt;&lt;endl;
    system(&quot;pause&quot;);
    OpSelect();
}

void OpMulti()
{
	system(&quot;cls&quot;);
    cout&lt;&lt;&quot;Enter a number to multiply.&quot;;
    cin &gt;&gt;NumOne;
    cout&lt;&lt;&quot;Enter a second number to multiply.&quot;;
    cin &gt;&gt;NumTwo;
    NumResult=NumOne*NumTwo;
    cout&lt;&lt;&quot;The result is &quot;&lt;&lt;NumResult&lt;&lt;&quot;.&quot;&lt;&lt;endl;
    cout&lt;&lt;endl;
    system(&quot;pause&quot;);
    OpSelect();
}

void OpDiv()
{   
	system(&quot;cls&quot;);
    cout&lt;&lt;&quot;Enter a number to divide.&quot;;
    cin &gt;&gt;NumOne;
    cout&lt;&lt;&quot;Enter a second number to divide.&quot;;
    cin &gt;&gt;NumTwo;
    NumResult=NumOne/NumTwo;
    cout&lt;&lt;&quot;The result is &quot;&lt;&lt;NumResult&lt;&lt;&quot;.&quot;&lt;&lt;endl;
    cout&lt;&lt;endl;
    system(&quot;pause&quot;);
    OpSelect();
}

int OpExit()
{
	system(&quot;cls&quot;);
	cout&lt;&lt;&quot;Goodbye &quot;&lt;&lt;StrName&lt;&lt;&quot;!&quot;&lt;&lt;endl;
    cout&lt;&lt;&quot;Thanks for using UltraCalc2000!&quot;&lt;&lt;endl;
    system(&quot;pause&quot;);
    exit(0);
}

void OpSelect()
{
	system(&quot;cls&quot;);
    cout&lt;&lt;&quot;1)Add&quot;&lt;&lt;endl;
    cout&lt;&lt;&quot;2)Subtract&quot;&lt;&lt;endl;
    cout&lt;&lt;&quot;3)Multiply&quot;&lt;&lt;endl;
    cout&lt;&lt;&quot;4)Divide&quot;&lt;&lt;endl;
    cout&lt;&lt;&quot;5)Exit&quot;&lt;&lt;endl;
    cin &gt;&gt;OpMethod;

        if (OpMethod==1)
        {
            OpAdd();
        }
        if (OpMethod==2)
        {
            OpSub();
        }
        if (OpMethod==3)
        {
            OpMulti();
        }
        if (OpMethod==4)
        {
            OpDiv();
        }
        if (OpMethod==5)
        {
            OpExit();
        }
}

int main()
{
	cout &lt;&lt; &quot;What's your name?&quot;&lt;&lt;endl;
	getline (cin, StrName);
	system(&quot;cls&quot;);
	cout &lt;&lt; &quot;Hello &quot; &lt;&lt; StrName &lt;&lt; &quot;.&quot;&lt;&lt;endl;
	cout &lt;&lt; endl;
	system(&quot;pause&quot;);
    OpSelect();
}
</code></pre>
<p>so, es funktioniert! danke allerseits.</p>
<p>jedoch verstehe ich das immer noch nicht:</p>
<blockquote>
<p>vor Deiner ersten Funktion (OpAdd) fehlt die Zeile</p>
<pre><code>int OpSelect();
</code></pre>
</blockquote>
<p>Stichwort: Prototype</p>
<p><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/1564142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564142</guid><dc:creator><![CDATA[alberto2000]]></dc:creator><pubDate>Wed, 13 Aug 2008 14:39:52 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 14:44:04 GMT]]></title><description><![CDATA[<p>lies dir mal <a href="http://tutorial.schornboeck.net/inhalt.htm" rel="nofollow">shade of mine's tutorial</a> durch</p>
<p>ist zwar schon was älter (ne toni <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="😉"
    /> ) aber egal, das ist immer noch ganz gut für einsteiger...</p>
<p>deine derzeitigen interessen werden in den ersten paar kapiteln gedeckt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1564149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564149</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Wed, 13 Aug 2008 14:44:04 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe mit meinem ersten C++ Programm on Wed, 13 Aug 2008 15:54:28 GMT]]></title><description><![CDATA[<p><strong>@alberto2000</strong></p>
<blockquote>
<p>Was sind Prototypen?</p>
</blockquote>
<p>Der Prototyp ist die Deklaration einer Funktion. Damit teilst Du den Compiler mit wie die Funktion heißt und wie viel Platz er auf dem Arbeitsspeicher reservieren soll.<br />
In C++ stehen die Deklarationen von Variablen (Platzhalter), Funktionen (Unterprogramme) und Klassen (Bausteine) in eine Headerdaite. Die Prototypen werden dazu benutzt, damit ein fremder Entwickler sehen kann, welche Funktionen ein Entwickler in seinen versteckten Quelltextdatei, die als eine Objektdatei vorliegt, verwenden kann.<br />
In BASIC gibt es keine Headerdateien und Datentypen sind nicht erforderlich, da diese Programmiersprache die Anweisung interpretiert und nicht kompiliert.<br />
Interpretieren bedeutet, Anweisungen werden Zeile für Zeile in Maschinensprache übersetzen.<br />
C++ benutzt eine ganz andere Technik. Es übersetzt die Anweisungsblöcke nur einmal und das &quot;komplett&quot; auf einen Schlag in Maschinensprache. Damit der C++-Kompiler die Variablen und Funktionen unterscheiden kann, müssen sie deklariert werden.</p>
<blockquote>
<p>Was ist jetzt noch falsch?</p>
</blockquote>
<p>Mir sind die if-Anweisungen ab der Zeile 82 aufgefallen. Die sind vom Syntax her nicht falsch, aber besser währe es, wenn Du in diesem Fall die Switch-Case-Anweisungen verwendest.</p>
<p>Beispiel:</p>
<pre><code>switch(OpMethod)
{
	case 1:
		OpAdd();
		break;
	case 2:
		OpSub();
		break;
	case 3:
		OpMulti();
		break;
	case 4:
		OpDiv();
		break;
	default:
		OpExit();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1564206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1564206</guid><dc:creator><![CDATA[stefan2008]]></dc:creator><pubDate>Wed, 13 Aug 2008 15:54:28 GMT</pubDate></item></channel></rss>