<?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[Sehr komischer Fehler - HILFE!! (dringend)]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe morgen eine Klausur zum Thema Sturkturen zu schreiben.<br />
Leider erhalte ich immer einene unerwarteten Fehler von meinem Borland 3.11 Compiler.<br />
Könnt ihr mir einen Tipp geben?</p>
<p>Wäre euch sehr dankbar, wenn ich das Problem heute noch beseitigen könnte.</p>
<p>Wunderte euch nicht über meinen Scrip-Stil. <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>Fehler: <strong>110: ) expected</strong></p>
<pre><code>// Verwalten einer Liste von CDs

#include &lt;stdio.h&gt;
#include &lt;iostream.h&gt;
#include &lt;conio.h&gt;
#include &lt;ctype.h&gt;
#include &lt;string.h&gt;

#define MAX_ANZAHL 10

struct CD
{	int nr;
	char titel[40],
		  interpret[40];
	char  genre[20];
	float preis;
};

int anzahl = 0; // Anzahl der CDs in der Liste

char menue()
{
	char antwort;
	printf(&quot;\n\nCD-VERWALTUNG&quot;);
	printf(&quot;\nfuege an.............a&quot;);         //erledigt
	printf(&quot;\ngib liste aus........g&quot;);         //erledigt
	printf(&quot;\nsuche................s&quot;);
	printf(&quot;\nbeenden..............b  &quot;);       //erledigt
	antwort = tolower(getche());
	return(antwort);
}

void meldung()
{	printf(&quot;\n\nDiese Funktion ist noch nicht implementiert?&quot;);
}

CD eingabe()
{
	CD cd;

	fflush(stdin);
	printf(&quot;\n\nNummer: &quot;);
	scanf(&quot;%d&quot;,&amp;cd.nr);

	fflush(stdin);
	printf(&quot;Titel: &quot;);
	gets(cd.titel);

	fflush(stdin);
	printf(&quot;Interpret: &quot;);
	gets(cd.interpret);

	fflush(stdin);
	printf(&quot;Genre: &quot;);
	gets(cd.genre);

	fflush(stdin);
	printf(&quot;Preis: &quot;);
	scanf(&quot;%f&quot;,&amp;cd.preis);
	return(cd);

}

void fuegeAn(CD cds[], CD cd)
{
  cds[anzahl]=cd;
  anzahl++;
}

void gibAus(CD cd)
{	printf(&quot;\n\n\n------------- CD -------------&quot;);
	printf(&quot;\n\n Nummer \t: %d&quot;, cd.nr);
	printf(&quot;\n\n Titel  \t: %s&quot;, cd.titel);
	printf(&quot;\n\n Interpret \t: %s&quot;, cd.interpret);
	printf(&quot;\n\n Genre  \t: %s&quot;, cd.genre);
	printf(&quot;\n\n Preis  \t: %f&quot;, cd.preis);
}

void gibAusListe(CD cds[])
{	printf(&quot;\n\nDie CDs :&quot;);
	for(int i = 0; i &lt; anzahl; i++)
	{	gibAus(cds[i]);
	}
}

void suche(CD cds[], name)
{      
	for(int i=0; i&lt;anzahl; i++)
	{
		if(strcmp(cds[i].titel,name)==0)
		{
			return(i);
		}
	}
	return(-1);
}

void main()
{	CD cds[MAX_ANZAHL], cd;
	char antwort, name[20];
	int index;

	clrscr();
	do
	{	antwort = menue();
		switch(antwort)
		{	case 'a':
				cd = eingabe();
				fuegeAn(cds,cd);
				break;
			case 'g': gibAusListe(cds);
				break;
			case 's':
				fflush(stdin);
				printf(&quot;\nWelchen Namen soi i suchen?&quot;);
				gets(name);
				index = suche(cds, name);
				if(index&lt;0)
				{	printf(&quot;\nName %s nicht gefunden&quot;,name);
				}
				else
				{	gibAus(cds[i]);
				}

				break;
			default:    break;
		}
	} while(antwort != 'b');
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/142330/sehr-komischer-fehler-hilfe-dringend</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Sep 2026 17:52:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/142330.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 29 Mar 2006 15:28:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 15:28:48 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich habe morgen eine Klausur zum Thema Sturkturen zu schreiben.<br />
Leider erhalte ich immer einene unerwarteten Fehler von meinem Borland 3.11 Compiler.<br />
Könnt ihr mir einen Tipp geben?</p>
<p>Wäre euch sehr dankbar, wenn ich das Problem heute noch beseitigen könnte.</p>
<p>Wunderte euch nicht über meinen Scrip-Stil. <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>Fehler: <strong>110: ) expected</strong></p>
<pre><code>// Verwalten einer Liste von CDs

#include &lt;stdio.h&gt;
#include &lt;iostream.h&gt;
#include &lt;conio.h&gt;
#include &lt;ctype.h&gt;
#include &lt;string.h&gt;

#define MAX_ANZAHL 10

struct CD
{	int nr;
	char titel[40],
		  interpret[40];
	char  genre[20];
	float preis;
};

int anzahl = 0; // Anzahl der CDs in der Liste

char menue()
{
	char antwort;
	printf(&quot;\n\nCD-VERWALTUNG&quot;);
	printf(&quot;\nfuege an.............a&quot;);         //erledigt
	printf(&quot;\ngib liste aus........g&quot;);         //erledigt
	printf(&quot;\nsuche................s&quot;);
	printf(&quot;\nbeenden..............b  &quot;);       //erledigt
	antwort = tolower(getche());
	return(antwort);
}

void meldung()
{	printf(&quot;\n\nDiese Funktion ist noch nicht implementiert?&quot;);
}

CD eingabe()
{
	CD cd;

	fflush(stdin);
	printf(&quot;\n\nNummer: &quot;);
	scanf(&quot;%d&quot;,&amp;cd.nr);

	fflush(stdin);
	printf(&quot;Titel: &quot;);
	gets(cd.titel);

	fflush(stdin);
	printf(&quot;Interpret: &quot;);
	gets(cd.interpret);

	fflush(stdin);
	printf(&quot;Genre: &quot;);
	gets(cd.genre);

	fflush(stdin);
	printf(&quot;Preis: &quot;);
	scanf(&quot;%f&quot;,&amp;cd.preis);
	return(cd);

}

void fuegeAn(CD cds[], CD cd)
{
  cds[anzahl]=cd;
  anzahl++;
}

void gibAus(CD cd)
{	printf(&quot;\n\n\n------------- CD -------------&quot;);
	printf(&quot;\n\n Nummer \t: %d&quot;, cd.nr);
	printf(&quot;\n\n Titel  \t: %s&quot;, cd.titel);
	printf(&quot;\n\n Interpret \t: %s&quot;, cd.interpret);
	printf(&quot;\n\n Genre  \t: %s&quot;, cd.genre);
	printf(&quot;\n\n Preis  \t: %f&quot;, cd.preis);
}

void gibAusListe(CD cds[])
{	printf(&quot;\n\nDie CDs :&quot;);
	for(int i = 0; i &lt; anzahl; i++)
	{	gibAus(cds[i]);
	}
}

void suche(CD cds[], name)
{      
	for(int i=0; i&lt;anzahl; i++)
	{
		if(strcmp(cds[i].titel,name)==0)
		{
			return(i);
		}
	}
	return(-1);
}

void main()
{	CD cds[MAX_ANZAHL], cd;
	char antwort, name[20];
	int index;

	clrscr();
	do
	{	antwort = menue();
		switch(antwort)
		{	case 'a':
				cd = eingabe();
				fuegeAn(cds,cd);
				break;
			case 'g': gibAusListe(cds);
				break;
			case 's':
				fflush(stdin);
				printf(&quot;\nWelchen Namen soi i suchen?&quot;);
				gets(name);
				index = suche(cds, name);
				if(index&lt;0)
				{	printf(&quot;\nName %s nicht gefunden&quot;,name);
				}
				else
				{	gibAus(cds[i]);
				}

				break;
			default:    break;
		}
	} while(antwort != 'b');
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1026599</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026599</guid><dc:creator><![CDATA[Corona]]></dc:creator><pubDate>Wed, 29 Mar 2006 15:28:48 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 15:51:00 GMT]]></title><description><![CDATA[<p>Corona schrieb:</p>
<blockquote>
<p>Fehler: <strong>110: ) expected</strong></p>
</blockquote>
<p>Erwartest du, daß wir jetzt die Zeilen einzeln abzählen um zu sehen,<br />
wo der Fehler auftritt?</p>
<p>Nein, danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1026619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026619</guid><dc:creator><![CDATA[Antwortender]]></dc:creator><pubDate>Wed, 29 Mar 2006 15:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:03:39 GMT]]></title><description><![CDATA[<p>Achso, SORRY, hab ich in der Eile ganz vergessen. <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>
<pre><code>void suche(CD cds[], name)
{      
    for(int i=0; i&lt;anzahl; i++)
    {
        if(strcmp(cds[i].titel,name)==0)
        {
            return(i);
        }
    }
    return(-1);
}
</code></pre>
<p>Der Fehler passiert dort gleich in der ersten Zeile.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1026633</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026633</guid><dc:creator><![CDATA[Corona]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:03:39 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:08:11 GMT]]></title><description><![CDATA[<p>hey</p>
<p>1. funktion sucheCD muss einen int wert zurückgeben, anstatt void<br />
2. name in sucheCD muss definiert werden vermutlich char*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1026635</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026635</guid><dc:creator><![CDATA[Cool_Fire]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:08:11 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:09:38 GMT]]></title><description><![CDATA[<p>name ist nicht definiert bzw. du hast den typen vergessen.</p>
<p>edit: zu spät <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/1026637</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026637</guid><dc:creator><![CDATA[Gideon]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:09:38 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:09:14 GMT]]></title><description><![CDATA[<pre><code>int suche(CD cds[],char* name)
{      
    for(int i=0; i&lt;anzahl; i++)
    {
        if(strcmp(cds[i].titel,name)==0)
        {
            return(i);
        }
    }
    return(-1);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1026638</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026638</guid><dc:creator><![CDATA[Cool_Fire]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:09:14 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:15:06 GMT]]></title><description><![CDATA[<p>VIELEN DANK!</p>
<p>*lol*, wenn ich das Programm nun starte und eine Suche starte, dann erhalte ich als Antwort negative Zahlen, Wochentage und Uhrzeiten, ist das normal? <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/1026647</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026647</guid><dc:creator><![CDATA[Corona]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:15:06 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:46:10 GMT]]></title><description><![CDATA[<p>ich erhalte die passende CD :p oder die meldung das es die CD nicht gibt.</p>
<pre><code class="language-cpp">// Verwalten einer Liste von CDs
#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;conio.h&gt;
#include &lt;ctype.h&gt;
#include &lt;string.h&gt;

#define MAX_ANZAHL 10

struct CD
{    int nr;
    char titel[40],
          interpret[40];
    char  genre[20];
    float preis;
};

int anzahl = 0; // Anzahl der CDs in der Liste
char antwort, name[20];

char menue()
{
    char antwort;
    printf(&quot;\n\nCD-VERWALTUNG&quot;);
    printf(&quot;\nfuege an.............a&quot;);         //erledigt
    printf(&quot;\ngib liste aus........g&quot;);         //erledigt
    printf(&quot;\nsuche................s&quot;);
    printf(&quot;\nbeenden..............b  &quot;);       //erledigt
    antwort = tolower(getche());
    return(antwort);
}

void meldung()
{    printf(&quot;\n\nDiese Funktion ist noch nicht implementiert?&quot;);
}

CD eingabe()
{
    CD cd;

    fflush(stdin);
    printf(&quot;\n\nNummer: &quot;);
    scanf(&quot;%d&quot;,&amp;cd.nr);

    fflush(stdin);
    printf(&quot;Titel: &quot;);
    gets(cd.titel);

    fflush(stdin);
    printf(&quot;Interpret: &quot;);
    gets(cd.interpret);

    fflush(stdin);
    printf(&quot;Genre: &quot;);
    gets(cd.genre);

    fflush(stdin);
    printf(&quot;Preis: &quot;);
    scanf(&quot;%f&quot;,&amp;cd.preis);
    return(cd);

}

void fuegeAn(CD cds[], CD cd)
{
  cds[anzahl]=cd;
  anzahl++;
}

void gibAus(CD cd)
{    printf(&quot;\n\n\n------------- CD -------------&quot;);
    printf(&quot;\n\n Nummer \t: %d&quot;, cd.nr);
    printf(&quot;\n\n Titel  \t: %s&quot;, cd.titel);
    printf(&quot;\n\n Interpret \t: %s&quot;, cd.interpret);
    printf(&quot;\n\n Genre  \t: %s&quot;, cd.genre);
    printf(&quot;\n\n Preis  \t: %f&quot;, cd.preis);
}

void gibAusListe(CD cds[])
{    printf(&quot;\n\nDie CDs :&quot;);
    for(int i = 0; i &lt; anzahl; i++)
    {    gibAus(cds[i]);
    }
}

int suche(CD cds[],char* name)
{      
    for(int i=0; i&lt;anzahl; i++)
    {
        if(strcmp(cds[i].titel,name)==0)
        {
            return(i);
        }
    }
    return(-1);
}

int main(int argc, char** argv) 
{    CD cds[MAX_ANZAHL], cd;
    char antwort, name[20];
    int index;

    system(&quot;cls&quot;);
    do
    {    antwort = menue();
        switch(antwort)
        {    case 'a':
                cd = eingabe();
                fuegeAn(cds,cd);
                break;
            case 'g': gibAusListe(cds);
                break;
            case 's':
                fflush(stdin);
                printf(&quot;\nWelchen Namen soll ich suchen?&quot;);
                gets(name);
                index = suche(cds, name);
                if(index&lt;0)
                {    printf(&quot;\nName %s nicht gefunden&quot;,name);
                }
                else
                {    gibAus(cds[index]);
                }

                break;
            default:    break;
        }
    } while(antwort != 'b');
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1026679</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026679</guid><dc:creator><![CDATA[Cool_Fire]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:46:10 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:53:43 GMT]]></title><description><![CDATA[<p>hehe .. wie ich sehe hast Du im letzten Teil das &quot;void main&quot; durch ein &quot;int main(...)&quot; ersetzt, was genau ist da der Unterschied? Eine Vereinfachung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1026686</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026686</guid><dc:creator><![CDATA[Corona]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:53:43 GMT</pubDate></item><item><title><![CDATA[Reply to Sehr komischer Fehler - HILFE!! (dringend) on Wed, 29 Mar 2006 16:54:41 GMT]]></title><description><![CDATA[<p>void main gibt es laut standard nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1026687</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026687</guid><dc:creator><![CDATA[Gideon]]></dc:creator><pubDate>Wed, 29 Mar 2006 16:54:41 GMT</pubDate></item></channel></rss>