<?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[Multiply.cpp]]></title><description><![CDATA[<p>hi ich bin dabei C++ in 21 Tage durch zuarbeiten, habe auch also so gemacht wie im Buche:</p>
<p>doch bei Multiply.cpp kommt ein Fehler:</p>
<p>hier der Text aus dem Buch:</p>
<p>1: #include &lt;iostream.h&gt;<br />
2: #include &lt;conio.h&gt;<br />
3: #pragma hdrstop<br />
4:<br />
5: int multiply(int, int);<br />
6: void showResult(int);<br />
7:<br />
8: int main(int argc, char **argv)<br />
9: {<br />
10: int x, y, result;<br />
11: cout &lt;&lt; endl &lt;&lt; &quot;Enter the first value: &quot;;<br />
12: cin &gt;&gt; x;<br />
13: cout &lt;&lt; &quot;Enter the second value: &quot;;<br />
14: cin &gt;&gt; y;<br />
15: result = multiply(x, y);<br />
16: showResult(result);<br />
17: cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; &quot;Press any key to continue...&quot;;<br />
18: getch();<br />
19: return 0;<br />
20: }<br />
21:<br />
22: int multiply(int x, int y)<br />
23: {<br />
24: return x * y;<br />
25: }<br />
26:<br />
27: void showResult(int res)<br />
28: {<br />
29: cout &lt;&lt; &quot;The result is: &quot; &lt;&lt; result &lt;&lt; endl;<br />
30: }</p>
<p>und hier meiner:</p>
<p>//---------------------------------------------------------------------------<br />
#include &lt;iostream.h&gt;<br />
#include &lt;conio.h&gt;<br />
#pragma hdrstop</p>
<p>//---------------------------------------------------------------------------</p>
<p>int multiply(int, int);<br />
void showResult(int);</p>
<p>int main(int argc, char* argv[])<br />
{<br />
int x, y, result;<br />
cout &lt;&lt; endl &lt;&lt; &quot;Enter the first value: &quot;;<br />
cin &gt;&gt; x;<br />
cout &lt;&lt; &quot;Enter the second value &quot;;<br />
cin &gt;&gt; y;<br />
result = multiply(x, y);<br />
showResult(result);<br />
cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; &quot;Press any key to continue...&quot;;<br />
getch();<br />
return 0;<br />
}</p>
<p>int multiply(int x, int y)<br />
{<br />
return x * y;<br />
}</p>
<p>void showResult(int res)<br />
{<br />
cout &lt;&lt; &quot;The result is: &quot; &lt;&lt; result &lt;&lt; endl;<br />
}</p>
<p>//---------------------------------------------------------------------------</p>
<p>habe Buchstabe für Buchstabe übernommen und es geht nicht..</p>
<p>Er sagt hier muss ein Fehler sein:</p>
<p>cout &lt;&lt; &quot;The result is: &quot; &lt;&lt; result &lt;&lt; endl;</p>
<p>Fehlermeldung:</p>
<p>[C++ Fehler] Unit1.cpp(34): E2451 Undefiniertes Symbol 'result'</p>
<p>ändere ich allerdings res in result oder result in res kommt:</p>
<p>[Linker Fehler] Unresolved external '__ExitVCL' referenced from C:\PROGRAMME\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl</p>
<p>Ein Freund meint mein C++ Builder ist falsch installiert....</p>
<p>Was ist denn nun wirklich Falsch?</p>
<p>greetings</p>
<p>Bass</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/127672/multiply-cpp</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Jul 2026 01:04:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/127672.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Nov 2005 12:49:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Multiply.cpp on Sat, 26 Nov 2005 12:49:19 GMT]]></title><description><![CDATA[<p>hi ich bin dabei C++ in 21 Tage durch zuarbeiten, habe auch also so gemacht wie im Buche:</p>
<p>doch bei Multiply.cpp kommt ein Fehler:</p>
<p>hier der Text aus dem Buch:</p>
<p>1: #include &lt;iostream.h&gt;<br />
2: #include &lt;conio.h&gt;<br />
3: #pragma hdrstop<br />
4:<br />
5: int multiply(int, int);<br />
6: void showResult(int);<br />
7:<br />
8: int main(int argc, char **argv)<br />
9: {<br />
10: int x, y, result;<br />
11: cout &lt;&lt; endl &lt;&lt; &quot;Enter the first value: &quot;;<br />
12: cin &gt;&gt; x;<br />
13: cout &lt;&lt; &quot;Enter the second value: &quot;;<br />
14: cin &gt;&gt; y;<br />
15: result = multiply(x, y);<br />
16: showResult(result);<br />
17: cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; &quot;Press any key to continue...&quot;;<br />
18: getch();<br />
19: return 0;<br />
20: }<br />
21:<br />
22: int multiply(int x, int y)<br />
23: {<br />
24: return x * y;<br />
25: }<br />
26:<br />
27: void showResult(int res)<br />
28: {<br />
29: cout &lt;&lt; &quot;The result is: &quot; &lt;&lt; result &lt;&lt; endl;<br />
30: }</p>
<p>und hier meiner:</p>
<p>//---------------------------------------------------------------------------<br />
#include &lt;iostream.h&gt;<br />
#include &lt;conio.h&gt;<br />
#pragma hdrstop</p>
<p>//---------------------------------------------------------------------------</p>
<p>int multiply(int, int);<br />
void showResult(int);</p>
<p>int main(int argc, char* argv[])<br />
{<br />
int x, y, result;<br />
cout &lt;&lt; endl &lt;&lt; &quot;Enter the first value: &quot;;<br />
cin &gt;&gt; x;<br />
cout &lt;&lt; &quot;Enter the second value &quot;;<br />
cin &gt;&gt; y;<br />
result = multiply(x, y);<br />
showResult(result);<br />
cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; &quot;Press any key to continue...&quot;;<br />
getch();<br />
return 0;<br />
}</p>
<p>int multiply(int x, int y)<br />
{<br />
return x * y;<br />
}</p>
<p>void showResult(int res)<br />
{<br />
cout &lt;&lt; &quot;The result is: &quot; &lt;&lt; result &lt;&lt; endl;<br />
}</p>
<p>//---------------------------------------------------------------------------</p>
<p>habe Buchstabe für Buchstabe übernommen und es geht nicht..</p>
<p>Er sagt hier muss ein Fehler sein:</p>
<p>cout &lt;&lt; &quot;The result is: &quot; &lt;&lt; result &lt;&lt; endl;</p>
<p>Fehlermeldung:</p>
<p>[C++ Fehler] Unit1.cpp(34): E2451 Undefiniertes Symbol 'result'</p>
<p>ändere ich allerdings res in result oder result in res kommt:</p>
<p>[Linker Fehler] Unresolved external '__ExitVCL' referenced from C:\PROGRAMME\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl</p>
<p>Ein Freund meint mein C++ Builder ist falsch installiert....</p>
<p>Was ist denn nun wirklich Falsch?</p>
<p>greetings</p>
<p>Bass</p>
]]></description><link>https://www.c-plusplus.net/forum/post/927586</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/927586</guid><dc:creator><![CDATA[bassdrum24]]></dc:creator><pubDate>Sat, 26 Nov 2005 12:49:19 GMT</pubDate></item><item><title><![CDATA[Reply to Multiply.cpp on Sat, 26 Nov 2005 13:14:03 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Das ist ein Standard C++ Konsolenprogramm, und damit gehört nicht hier ins Builder-Forum.<br />
Dein Fehler beruht darauf, das du in der Funktion ShowResult() den Parameter verwenden must, und nicht eine Variable aus einer anderen, aufrufenden Funktion</p>
<pre><code class="language-cpp">void showResult(int res)
{
cout &lt;&lt; &quot;The result is: &quot; &lt;&lt; res &lt;&lt; endl; // res statt Result
}
</code></pre>
<p>/Edit : Bitte benutzt hier im Forum zum darstellen von Quellcode die C++ Code Tags. Diese findest du beim Erstellen eines Posts direkt links unter den Smilies.</p>
<p>/Edit : Und der Linker fehler kommt wahrscheinlich daher, das du diesen Quellcode nicht als Konsolenprogramm eingeben hast. Dazu must du Menü <em>Datei/Neu/Konsolen-Experte</em> ausführen, und dort die Option <em>VCL verwenden</em> deaktivieren.<br />
bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/927595</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/927595</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 26 Nov 2005 13:14:03 GMT</pubDate></item></channel></rss>