<?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[verlinkungsproblem?]]></title><description><![CDATA[<p>Hi Leute,<br />
weiß einer weiter?? Frage mich warum der arab1 und arab2 so Probleme macht...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &quot;funktionen.h&quot;
using namespace std;

int addiereRoemisch(char *zahl1, char *zahl2);
int romZuArabien(char *rom);
char *arabienZuRom(int arabisch);

struct zahlen
{
    char zahlenwert;
    char zeichenkette[];
};

int main()
{
    zahlen roemisch;
    zahlen roemisch1;
    char zahl1[10], zahl2[10];
    int ergebnis;
    char *ergebnisRoemisch;

    cout &lt;&lt; &quot;Bitte geben Sie eine erste Zahl ein:&quot;;
    cin &gt;&gt; roemisch.zahlenwert;
    cout &lt;&lt; &quot;Bitte geben Sie eine zweite Zahl ein:&quot;;
    cin &gt;&gt; roemisch1.zahlenwert;

    ergebnis=addiereRoemisch(&amp;roemisch.zahlenwert,&amp;roemisch1.zahlenwert);
    ergebnisRoemisch=arabienZuRom(ergebnis);

    cout &lt;&lt; zahl1 &lt;&lt; &quot; + &quot; &lt;&lt; zahl2 &lt;&lt; &quot; = &quot; &lt;&lt; ergebnisRoemisch &lt;&lt; endl;
    {
        /* bitte ignorieren; nur bis zu Ihrer Anmeldung notwendig */
        int x;
        cin &gt;&gt; x;
    }
}
</code></pre>
<p>und meine header Datei</p>
<pre><code class="language-cpp">#ifndef Sitzung_4_Auslagerung_Header_h
#define Sitzung_4_Auslagerung_Header_h

#include &lt;iostream&gt;

using namespace std;

#endif
int addiereRoemisch(char *zahl1,/* zahl1= Zeiger auf ein erwartetes char, nach aufruf zeigt es uf die adresse von roemisch.zahlenwert in der main*/
 char *zahl2)
{
    int resultat,arab1=0,arab2=0;

    arab1=romZuArabien(zahl1);
    arab2=romZuArabien(zahl2);
    resultat=arab1+arab2;

    return resultat;
}

int romZuArabien(char *rom)
{
    char roemischeZiffern[8] = &quot;ivxlcdm&quot;;
    int ziffernWert[7] = {1, 5, 10, 50, 100, 500, 1000};
    int arabisch[10], stellen=0, resultat;
    int j;

    if (rom[0]=='0') return 0;

    stellen=0;
    for (j=0; rom[stellen]!='\0'; stellen++)
    {
        for (j = 0; j &lt; 7; j++)
            if (rom[stellen] == roemischeZiffern[j])
            {
                arabisch[stellen] = ziffernWert[j];
                break;
            }
        if (j == 7) return 0;
    }

    for (j=1; j &lt; stellen; j++)
        if (arabisch[j] &gt; arabisch[j-1])
        {
            arabisch[j] -= arabisch[j-1];
            arabisch[j-1] = 0;
        }

    resultat=0;
    for (j=0; j &lt; stellen; j++) resultat += arabisch[j];

    return resultat;
}

char *arabienZuRom(int arabisch)
{
    char *resultat;
    char roemischeZiffern[8] = &quot;mdclxvi&quot;;
    int ziffernWert[7] = {1000,500,100,50,10,5,1};
    int stelle=0;

    resultat = new char[10];
    for (int i = 0; i &lt; 7; i++)
    {
        while (arabisch &gt;= ziffernWert[i])
        {
            resultat[stelle] = roemischeZiffern[i];
            arabisch -= ziffernWert[i];
            stelle++;
        }
    }
    resultat[stelle]='\0';

    return resultat;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/321797/verlinkungsproblem</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 21:59:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/321797.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 Nov 2013 19:52:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to verlinkungsproblem? on Sun, 24 Nov 2013 19:52:25 GMT]]></title><description><![CDATA[<p>Hi Leute,<br />
weiß einer weiter?? Frage mich warum der arab1 und arab2 so Probleme macht...</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &quot;funktionen.h&quot;
using namespace std;

int addiereRoemisch(char *zahl1, char *zahl2);
int romZuArabien(char *rom);
char *arabienZuRom(int arabisch);

struct zahlen
{
    char zahlenwert;
    char zeichenkette[];
};

int main()
{
    zahlen roemisch;
    zahlen roemisch1;
    char zahl1[10], zahl2[10];
    int ergebnis;
    char *ergebnisRoemisch;

    cout &lt;&lt; &quot;Bitte geben Sie eine erste Zahl ein:&quot;;
    cin &gt;&gt; roemisch.zahlenwert;
    cout &lt;&lt; &quot;Bitte geben Sie eine zweite Zahl ein:&quot;;
    cin &gt;&gt; roemisch1.zahlenwert;

    ergebnis=addiereRoemisch(&amp;roemisch.zahlenwert,&amp;roemisch1.zahlenwert);
    ergebnisRoemisch=arabienZuRom(ergebnis);

    cout &lt;&lt; zahl1 &lt;&lt; &quot; + &quot; &lt;&lt; zahl2 &lt;&lt; &quot; = &quot; &lt;&lt; ergebnisRoemisch &lt;&lt; endl;
    {
        /* bitte ignorieren; nur bis zu Ihrer Anmeldung notwendig */
        int x;
        cin &gt;&gt; x;
    }
}
</code></pre>
<p>und meine header Datei</p>
<pre><code class="language-cpp">#ifndef Sitzung_4_Auslagerung_Header_h
#define Sitzung_4_Auslagerung_Header_h

#include &lt;iostream&gt;

using namespace std;

#endif
int addiereRoemisch(char *zahl1,/* zahl1= Zeiger auf ein erwartetes char, nach aufruf zeigt es uf die adresse von roemisch.zahlenwert in der main*/
 char *zahl2)
{
    int resultat,arab1=0,arab2=0;

    arab1=romZuArabien(zahl1);
    arab2=romZuArabien(zahl2);
    resultat=arab1+arab2;

    return resultat;
}

int romZuArabien(char *rom)
{
    char roemischeZiffern[8] = &quot;ivxlcdm&quot;;
    int ziffernWert[7] = {1, 5, 10, 50, 100, 500, 1000};
    int arabisch[10], stellen=0, resultat;
    int j;

    if (rom[0]=='0') return 0;

    stellen=0;
    for (j=0; rom[stellen]!='\0'; stellen++)
    {
        for (j = 0; j &lt; 7; j++)
            if (rom[stellen] == roemischeZiffern[j])
            {
                arabisch[stellen] = ziffernWert[j];
                break;
            }
        if (j == 7) return 0;
    }

    for (j=1; j &lt; stellen; j++)
        if (arabisch[j] &gt; arabisch[j-1])
        {
            arabisch[j] -= arabisch[j-1];
            arabisch[j-1] = 0;
        }

    resultat=0;
    for (j=0; j &lt; stellen; j++) resultat += arabisch[j];

    return resultat;
}

char *arabienZuRom(int arabisch)
{
    char *resultat;
    char roemischeZiffern[8] = &quot;mdclxvi&quot;;
    int ziffernWert[7] = {1000,500,100,50,10,5,1};
    int stelle=0;

    resultat = new char[10];
    for (int i = 0; i &lt; 7; i++)
    {
        while (arabisch &gt;= ziffernWert[i])
        {
            resultat[stelle] = roemischeZiffern[i];
            arabisch -= ziffernWert[i];
            stelle++;
        }
    }
    resultat[stelle]='\0';

    return resultat;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2367658</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2367658</guid><dc:creator><![CDATA[3DMan]]></dc:creator><pubDate>Sun, 24 Nov 2013 19:52:25 GMT</pubDate></item><item><title><![CDATA[Reply to verlinkungsproblem? on Sun, 24 Nov 2013 20:01:59 GMT]]></title><link>https://www.c-plusplus.net/forum/post/2367660</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2367660</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Sun, 24 Nov 2013 20:01:59 GMT</pubDate></item><item><title><![CDATA[Reply to verlinkungsproblem? on Sun, 24 Nov 2013 20:05:15 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote></blockquote>
<p>Ach soo :D, vielen Dank!!^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2367662</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2367662</guid><dc:creator><![CDATA[3DMan]]></dc:creator><pubDate>Sun, 24 Nov 2013 20:05:15 GMT</pubDate></item><item><title><![CDATA[Reply to verlinkungsproblem? on Sun, 24 Nov 2013 20:52:22 GMT]]></title><description><![CDATA[<p>Was ist dein Problem? Wir können nicht hellsehen.<br />
<a href="http://www.c-plusplus.net/forum/304133" rel="nofollow">http://www.c-plusplus.net/forum/304133</a><br />
<a href="http://www.c-plusplus.net/forum/200753" rel="nofollow">http://www.c-plusplus.net/forum/200753</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2367669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2367669</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sun, 24 Nov 2013 20:52:22 GMT</pubDate></item><item><title><![CDATA[Reply to verlinkungsproblem? on Sun, 24 Nov 2013 20:56:47 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Wir können nicht hellsehen.</p>
</blockquote>
<p>Willst du uns verarschen oder was? Deine Glaskugel ist doch angeblich in der Reperatur?! Und du hast mir gesagt, mein Hund würde wieder gesund werden! <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="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2367671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2367671</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Sun, 24 Nov 2013 20:56:47 GMT</pubDate></item><item><title><![CDATA[Reply to verlinkungsproblem? on Mon, 25 Nov 2013 07:34:00 GMT]]></title><description><![CDATA[<p>Funktionsdefinitionen haben in Headerdateien nichts zu suchen.</p>
<p>Wieviel Speicher belegt zahlenwert (in struct zahlen)?<br />
Und wie behandelst du es in den Funktionen?</p>
<p>Was sind deine Eingaben?</p>
<p>Ist dir der Unterschied zwischen <code>char</code> , <code>char[10]</code> und <code>char*</code> klar?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2367721</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2367721</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Mon, 25 Nov 2013 07:34:00 GMT</pubDate></item></channel></rss>