<?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[expected primary-xpression before &#x27;float&#x27;]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bin neu hier und in der Programmiersprache C++.<br />
Ich bingrad dabei eine binäre suche mit vertaucher zu programmieren. Allerdings bekomme ich immer die Fehlermeldung &quot;expected primary-xpression before 'float' &quot;<br />
Ich weiß nicht, was ich falsch mache. Vielleicht kann mir jemand helfen?</p>
<p>Hier der Code:</p>
<p>main.cpp</p>
<p>int main()<br />
{</p>
<p>cout &lt;&lt; &quot;\n&quot;;<br />
cout &lt;&lt; &quot;ERNSTL, die am haeufigsten vorkommenden Buchstaben, absteigend soriert (1. = e; 2. = r, ...&quot;;<br />
cout &lt;&lt; &quot;\nGegeben sei folgender Satz: &quot; &lt;&lt; endl;<br />
cout &lt;&lt; &quot;Mama besteht aus vier Buchstaben.&quot; &lt;&lt; endl;<br />
cout &lt;&lt; &quot;\n&quot; &lt;&lt; endl;<br />
cout &lt;&lt; &quot;Es besteht die Aufgabe, den häufigsten Buchstaben durch 'e' zu ersetzen, \n&quot;;<br />
cout &lt;&lt; &quot;den am zweithaeufigsten durch 'r' zu ersetzen usw. 'ERNSTL'.&quot; &lt;&lt; endl ;</p>
<p>suche s1;<br />
vertauschen v1;</p>
<p>s1.minSuche(float zahlen[], int anzahl, int startPosition);<br />
v1.vertausche(float zahlen[], &lt;#int erstePosition#&gt;, &lt;#int gefundenesElement#&gt;);</p>
<p>}</p>
<p>suche.cpp:</p>
<p>int suche::minSuche(float zahlen[], int anzahl, int startPosition)<br />
{</p>
<p>min = zahlen[startPosition];<br />
indexMin = startPosition;<br />
for (int i = startPosition + 1; i&lt;anzahl; i++)<br />
{<br />
if (zahlen[i] &lt; min)<br />
{<br />
min = zahlen[i];<br />
indexMin = i;<br />
}</p>
<p>return indexMin;<br />
}<br />
return 0;<br />
}</p>
<p>suche.h:</p>
<p>class suche<br />
{<br />
protected:<br />
float min;<br />
int indexMin;<br />
float zahlen[];<br />
int anzahl;<br />
int startPosition;</p>
<p>public:<br />
int minSuche(float zahlen[], int anzahl, int startPosition);<br />
};</p>
<p>Vielen Dank für eure Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/279162/expected-primary-xpression-before-float</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 19:02:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/279162.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Dec 2010 10:11:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to expected primary-xpression before &#x27;float&#x27; on Mon, 20 Dec 2010 10:11:28 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bin neu hier und in der Programmiersprache C++.<br />
Ich bingrad dabei eine binäre suche mit vertaucher zu programmieren. Allerdings bekomme ich immer die Fehlermeldung &quot;expected primary-xpression before 'float' &quot;<br />
Ich weiß nicht, was ich falsch mache. Vielleicht kann mir jemand helfen?</p>
<p>Hier der Code:</p>
<p>main.cpp</p>
<p>int main()<br />
{</p>
<p>cout &lt;&lt; &quot;\n&quot;;<br />
cout &lt;&lt; &quot;ERNSTL, die am haeufigsten vorkommenden Buchstaben, absteigend soriert (1. = e; 2. = r, ...&quot;;<br />
cout &lt;&lt; &quot;\nGegeben sei folgender Satz: &quot; &lt;&lt; endl;<br />
cout &lt;&lt; &quot;Mama besteht aus vier Buchstaben.&quot; &lt;&lt; endl;<br />
cout &lt;&lt; &quot;\n&quot; &lt;&lt; endl;<br />
cout &lt;&lt; &quot;Es besteht die Aufgabe, den häufigsten Buchstaben durch 'e' zu ersetzen, \n&quot;;<br />
cout &lt;&lt; &quot;den am zweithaeufigsten durch 'r' zu ersetzen usw. 'ERNSTL'.&quot; &lt;&lt; endl ;</p>
<p>suche s1;<br />
vertauschen v1;</p>
<p>s1.minSuche(float zahlen[], int anzahl, int startPosition);<br />
v1.vertausche(float zahlen[], &lt;#int erstePosition#&gt;, &lt;#int gefundenesElement#&gt;);</p>
<p>}</p>
<p>suche.cpp:</p>
<p>int suche::minSuche(float zahlen[], int anzahl, int startPosition)<br />
{</p>
<p>min = zahlen[startPosition];<br />
indexMin = startPosition;<br />
for (int i = startPosition + 1; i&lt;anzahl; i++)<br />
{<br />
if (zahlen[i] &lt; min)<br />
{<br />
min = zahlen[i];<br />
indexMin = i;<br />
}</p>
<p>return indexMin;<br />
}<br />
return 0;<br />
}</p>
<p>suche.h:</p>
<p>class suche<br />
{<br />
protected:<br />
float min;<br />
int indexMin;<br />
float zahlen[];<br />
int anzahl;<br />
int startPosition;</p>
<p>public:<br />
int minSuche(float zahlen[], int anzahl, int startPosition);<br />
};</p>
<p>Vielen Dank für eure Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1997062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1997062</guid><dc:creator><![CDATA[micha1991]]></dc:creator><pubDate>Mon, 20 Dec 2010 10:11:28 GMT</pubDate></item><item><title><![CDATA[Reply to expected primary-xpression before &#x27;float&#x27; on Mon, 20 Dec 2010 10:20:07 GMT]]></title><description><![CDATA[<p>Bei Funktionsaufrufen gibt man keine Typen für die Parameter an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1997066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1997066</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Mon, 20 Dec 2010 10:20:07 GMT</pubDate></item><item><title><![CDATA[Reply to expected primary-xpression before &#x27;float&#x27; on Mon, 20 Dec 2010 10:40:55 GMT]]></title><description><![CDATA[<p>wo genau? Sorry, steh grad bisschen auf dem Schlauch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1997084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1997084</guid><dc:creator><![CDATA[micha1991]]></dc:creator><pubDate>Mon, 20 Dec 2010 10:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to expected primary-xpression before &#x27;float&#x27; on Mon, 20 Dec 2010 10:50:09 GMT]]></title><description><![CDATA[<p>Da, wo der Compiler den Fehler meldet?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1997090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1997090</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Mon, 20 Dec 2010 10:50:09 GMT</pubDate></item></channel></rss>