<?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[Compilerproblem]]></title><description><![CDATA[<p>Hey Leute das heutige Problem hat eher weniger etwas direkt mit dem Inhalt eines Programms zu tun sondern mit einem Compilerproblem</p>
<p>hier die Fehlermeldung des Compilers und leider weiß ich auch nicht welcher Compiler benutzt wird</p>
<pre><code>ld: fatal: symbol `main' is multiply-defined:
    (file /var/tmp//ccegeyUY.o type=FUNC; file /var/tmp//ccYFqFqz.o type=FUNC);
</code></pre>
<p>da mein compiler ( gcc ) nichts sagt steh ich grad wie der Ochs vorm berg und hab keine ahnung was genau ich jetzt falsch gemacht hab</p>
<p>Dies ist die headerdatei</p>
<p>nicht schön aber es tut was es soll <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>
<pre><code>#ifndef strop3_h
#define strop3_h

/*    if |b1|+|b2| &lt; bl1
        appends the character sequence stored in b2 to that contained in buffer b1
        returns |b1|+|b2|
    otherwise
        b1 remains unchanged
        returns -1
*/
int concat(char *b1, int bl1, char *b2)
{

 int i,lenb1,lenb2,a,laengeb1;

 lenb2=0;

 //länge b1 bestimmen

lenb1=0;

for(i=0; i &lt; 5000; i++){
            lenb1++;

                if (b1[i] =='\0'){
                    i=5000;}

            }

//länge b2 bestimmen
bl1=10;

   for(i=0; i &lt; 5000; i++){
            lenb2++;

                if (b2[i] == '\0'){
                    break;}

            }

a=0;

// B2 in B1 schreiben

laengeb1=(lenb1-1)+(lenb2-1);

//printf (&quot;\ndies ist die maximallaenge des ersten Feldes : %i\n&quot;, bl1);

if (laengeb1&lt;bl1)
{

printf (&quot;\ndies ist die laenge von b1 : %i \n&quot;,laengeb1);

for (i=lenb1-1 ; i&lt;laengeb1 ; i++)
{
b1[i] = b2[a] ;
a++;
}

}
else
{  
printf (&quot;\nZeichenkette zu lang&quot;);
return -1;
}
return 0;
}

#endif
</code></pre>
<p>und das dazugehörige hauptprogramm</p>
<pre><code># include &quot;stdio.h&quot;
# include &quot;stdlib.h&quot;
# include &lt;ctype.h&gt;

# include &quot;strop3.h&quot;

int main()
{
int bl1,c,l2,i,d,o;
bl1 = 5000;
i = 0;
l2=5000;
char b1[bl1],b2[l2];

bl1=100;
printf (&quot;Gib die erste Zeichenkette ein\n&quot;);

// erste Zeichenkette
for (i=0;i&lt;5000;i++)
{

c = getchar();

if (isspace(c) != 0 ){
b1[i] = '\0';

break;}

b1[i] = c;
}

b1[i]='\0';

// zweite Zeichenkette
printf (&quot;Gib die zweite Zeichenkette ein\n&quot;);

for (o=0;o&lt;5000;o++)
{

d = getchar();

if (isspace(d) != 0 ){
b2[o] = '\0';

break;}

b2[o] = d;
}

// Aufruf der Funktion
concat (b1,bl1,b2);

if (concat != 0);
{
printf(&quot;\nin b1 enthaltene Zeichenkette : %s \n&quot;, b1);
}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/256863/compilerproblem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 20:12:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/256863.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Dec 2009 21:25:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Compilerproblem on Fri, 18 Dec 2009 21:25:23 GMT]]></title><description><![CDATA[<p>Hey Leute das heutige Problem hat eher weniger etwas direkt mit dem Inhalt eines Programms zu tun sondern mit einem Compilerproblem</p>
<p>hier die Fehlermeldung des Compilers und leider weiß ich auch nicht welcher Compiler benutzt wird</p>
<pre><code>ld: fatal: symbol `main' is multiply-defined:
    (file /var/tmp//ccegeyUY.o type=FUNC; file /var/tmp//ccYFqFqz.o type=FUNC);
</code></pre>
<p>da mein compiler ( gcc ) nichts sagt steh ich grad wie der Ochs vorm berg und hab keine ahnung was genau ich jetzt falsch gemacht hab</p>
<p>Dies ist die headerdatei</p>
<p>nicht schön aber es tut was es soll <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>
<pre><code>#ifndef strop3_h
#define strop3_h

/*    if |b1|+|b2| &lt; bl1
        appends the character sequence stored in b2 to that contained in buffer b1
        returns |b1|+|b2|
    otherwise
        b1 remains unchanged
        returns -1
*/
int concat(char *b1, int bl1, char *b2)
{

 int i,lenb1,lenb2,a,laengeb1;

 lenb2=0;

 //länge b1 bestimmen

lenb1=0;

for(i=0; i &lt; 5000; i++){
            lenb1++;

                if (b1[i] =='\0'){
                    i=5000;}

            }

//länge b2 bestimmen
bl1=10;

   for(i=0; i &lt; 5000; i++){
            lenb2++;

                if (b2[i] == '\0'){
                    break;}

            }

a=0;

// B2 in B1 schreiben

laengeb1=(lenb1-1)+(lenb2-1);

//printf (&quot;\ndies ist die maximallaenge des ersten Feldes : %i\n&quot;, bl1);

if (laengeb1&lt;bl1)
{

printf (&quot;\ndies ist die laenge von b1 : %i \n&quot;,laengeb1);

for (i=lenb1-1 ; i&lt;laengeb1 ; i++)
{
b1[i] = b2[a] ;
a++;
}

}
else
{  
printf (&quot;\nZeichenkette zu lang&quot;);
return -1;
}
return 0;
}

#endif
</code></pre>
<p>und das dazugehörige hauptprogramm</p>
<pre><code># include &quot;stdio.h&quot;
# include &quot;stdlib.h&quot;
# include &lt;ctype.h&gt;

# include &quot;strop3.h&quot;

int main()
{
int bl1,c,l2,i,d,o;
bl1 = 5000;
i = 0;
l2=5000;
char b1[bl1],b2[l2];

bl1=100;
printf (&quot;Gib die erste Zeichenkette ein\n&quot;);

// erste Zeichenkette
for (i=0;i&lt;5000;i++)
{

c = getchar();

if (isspace(c) != 0 ){
b1[i] = '\0';

break;}

b1[i] = c;
}

b1[i]='\0';

// zweite Zeichenkette
printf (&quot;Gib die zweite Zeichenkette ein\n&quot;);

for (o=0;o&lt;5000;o++)
{

d = getchar();

if (isspace(d) != 0 ){
b2[o] = '\0';

break;}

b2[o] = d;
}

// Aufruf der Funktion
concat (b1,bl1,b2);

if (concat != 0);
{
printf(&quot;\nin b1 enthaltene Zeichenkette : %s \n&quot;, b1);
}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1824740</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1824740</guid><dc:creator><![CDATA[ince1]]></dc:creator><pubDate>Fri, 18 Dec 2009 21:25:23 GMT</pubDate></item><item><title><![CDATA[Reply to Compilerproblem on Fri, 18 Dec 2009 21:26:12 GMT]]></title><description><![CDATA[<p>-.- Scherzkeks.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1824741</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1824741</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Fri, 18 Dec 2009 21:26:12 GMT</pubDate></item><item><title><![CDATA[Reply to Compilerproblem on Sat, 19 Dec 2009 00:00:41 GMT]]></title><description><![CDATA[<p>Firefighter schrieb:</p>
<blockquote>
<p>-.- Scherzkeks.</p>
</blockquote>
<p>Ist das die Lösung?</p>
<p>Blödmann, also echt mal...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1824801</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1824801</guid><dc:creator><![CDATA[ince1]]></dc:creator><pubDate>Sat, 19 Dec 2009 00:00:41 GMT</pubDate></item><item><title><![CDATA[Reply to Compilerproblem on Sat, 19 Dec 2009 00:05:26 GMT]]></title><description><![CDATA[<p>ince1 schrieb:</p>
<blockquote>
<p>Firefighter schrieb:</p>
<blockquote>
<p>-.- Scherzkeks.</p>
</blockquote>
<p>Ist das die Lösung?</p>
<p>Blödmann, also echt mal...</p>
</blockquote>
<p>Scherzkeks.<br />
Es ist immer noch nicht C#.<br />
Auch wenn Du noch auf bleibst und gegen halb drei nochmal postest, wird es nicht C# werden. Und ich kanns nicht nach C verschieben und Du auch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1824803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1824803</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sat, 19 Dec 2009 00:05:26 GMT</pubDate></item><item><title><![CDATA[Reply to Compilerproblem on Sat, 19 Dec 2009 14:18:10 GMT]]></title><description><![CDATA[<p>ince1 schrieb:</p>
<blockquote>
<pre><code>ld: fatal: symbol `main' is multiply-defined:
    (file /var/tmp//ccegeyUY.o type=FUNC; file /var/tmp//ccYFqFqz.o type=FUNC);
</code></pre>
</blockquote>
<p>steht doch da ... Du hast 2x <strong>int main()</strong> angegeben ... entscheide Dich welche variante Du willst und lösche die andere</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1824972</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1824972</guid><dc:creator><![CDATA[mogel]]></dc:creator><pubDate>Sat, 19 Dec 2009 14:18:10 GMT</pubDate></item><item><title><![CDATA[Reply to Compilerproblem on Sat, 19 Dec 2009 14:33:04 GMT]]></title><description><![CDATA[<p>Also Fragen posten will auch gekonnt sein. <a href="http://c-plusplus.net/forum/viewtopic-var-t-is-256857.html" rel="nofollow">Hier</a> der gleiche Beitrag ne Stunde vor diesem erstellt und gleich drauf hingewiesen worden das es im falschen Forum ist. Und wo wird das neue Thema erstellt, wieder im gleichen falschen Forum...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1824981</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1824981</guid><dc:creator><![CDATA[Zwergli]]></dc:creator><pubDate>Sat, 19 Dec 2009 14:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to Compilerproblem on Sat, 19 Dec 2009 15:48:12 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-275.html" rel="nofollow">Unix-Tom</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-28.html" rel="nofollow">C# und .NET</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-10.html" rel="nofollow">ANSI C</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1825012</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1825012</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 19 Dec 2009 15:48:12 GMT</pubDate></item></channel></rss>