<?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[F(x)=x^2+nx+n Funktion auseinander nehmen]]></title><description><![CDATA[<p>Hi,</p>
<p>Ich hab ein problem, und zwar:</p>
<p>Ich möchte, ein Programm schreiben das eine f(x) Funktion auseiander nimmt.<br />
Ein Beispiel: f(x)=<em>(1)x</em><sup>**2**+*3x***(</sup>1)<strong>+<em>1</em></strong>(^0)**<br />
f(x)= x^2+3x+1</p>
<p>Und diese sollen in die Felder von Factor und Exponents eingetragen werden<br />
so sollte es dann aussehen:</p>
<p>Factor: <em>1, 3, 1</em></p>
<p>Exponents: <strong>2, 1, 0</strong></p>
<p>Ich hoffe ihr wisst was ich meine.</p>
<p>hat jemand ne einfach c++ Lösung dafür oder ne Idee?</p>
<p>danke für die Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/151629/f-x-x-2-nx-n-funktion-auseinander-nehmen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Apr 2026 18:25:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/151629.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2006 08:22:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 08:24:45 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>Ich hab ein problem, und zwar:</p>
<p>Ich möchte, ein Programm schreiben das eine f(x) Funktion auseiander nimmt.<br />
Ein Beispiel: f(x)=<em>(1)x</em><sup>**2**+*3x***(</sup>1)<strong>+<em>1</em></strong>(^0)**<br />
f(x)= x^2+3x+1</p>
<p>Und diese sollen in die Felder von Factor und Exponents eingetragen werden<br />
so sollte es dann aussehen:</p>
<p>Factor: <em>1, 3, 1</em></p>
<p>Exponents: <strong>2, 1, 0</strong></p>
<p>Ich hoffe ihr wisst was ich meine.</p>
<p>hat jemand ne einfach c++ Lösung dafür oder ne Idee?</p>
<p>danke für die Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087387</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087387</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jun 2006 08:24:45 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 08:26:46 GMT]]></title><description><![CDATA[<p>Ich würde damit anfangen, den String an den Plus- (bzw. Minus-) zeichen aufzutrennen. Dann kannst du jedes Glied einzeln darauf untersuchen, ob ein Koeffizient oder ein Exponent drin ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087389</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087389</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 28 Jun 2006 08:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 08:36:46 GMT]]></title><description><![CDATA[<p>Wie mach ich das am besten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087397</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jun 2006 08:36:46 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 08:42:16 GMT]]></title><description><![CDATA[<p>Mit std::string::find und std::string::substr.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087404</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 28 Jun 2006 08:42:16 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 08:48:07 GMT]]></title><description><![CDATA[<p>Aus du dafür vielleicht eine seite die das gut erklärt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087412</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087412</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jun 2006 08:48:07 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 09:04:31 GMT]]></title><description><![CDATA[<p><a href="http://www.cppreference.com/cppstring/index.html" rel="nofollow">http://www.cppreference.com/cppstring/index.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087433</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 28 Jun 2006 09:04:31 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 09:06:47 GMT]]></title><description><![CDATA[<p>bool polyProcessString(string iString, vector&lt;double&gt; &amp;oFactors, vector&lt;double&gt; &amp;oExponents)<br />
{<br />
string::size_type lastPos=0;<br />
while(true)<br />
{<br />
string::size_type pos=iString.find_first_of(&quot;+-&quot;,lastPos+1);<br />
if(pos==string::npos)<br />
{<br />
string sub=iString.substr(lastPos,iString.length()-lastPos);<br />
return polyProcessSum(sub,oFactors,oExponents);<br />
}<br />
string sub=iString.substr(lastPos,pos-lastPos);<br />
if(!polyProcessSum(sub,oFactors,oExponents))return false;<br />
lastPos=pos;<br />
}<br />
return true;<br />
}</p>
<p>Ist das so richtig?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087434</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087434</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jun 2006 09:06:47 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 09:09:04 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Eas gibt doch bereits Bibliotheken, die das können. Da must du mal bei <a href="http://google.de" rel="nofollow">google.de</a> schauen.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087438</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087438</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jun 2006 09:09:04 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 09:11:52 GMT]]></title><description><![CDATA[<p>Ingless schrieb:</p>
<blockquote>
<p>Ist das so richtig?</p>
</blockquote>
<p>Kommt wohl drauf an, wie polyProcessSum aussieht. Hast du das selbst geschrieben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087441</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 28 Jun 2006 09:11:52 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 10:14:32 GMT]]></title><description><![CDATA[<p>bool polyProcessSum(string iSum, vector&lt;double&gt; &amp;oFactors, vector&lt;double&gt; &amp;oExponents)<br />
{<br />
MessageBox(NULL,iSum.c_str() ,&quot;Test2&quot; ,MB_OK);<br />
string::size_type posX=iSum.find(&quot;x&quot;);<br />
if(posX==string::npos)<br />
{<br />
oFactors.push_back(atof(iSum.c_str()));<br />
oExponents.push_back(0.0);<br />
}<br />
else<br />
{<br />
string::size_type posH=iSum.find(&quot;^&quot;);<br />
if(posH==string::npos)<br />
{<br />
oFactors.push_back(atof(iSum.substr(0,posX).c_str()));<br />
oExponents.push_back(1.0);<br />
}<br />
else<br />
{<br />
double tmp=atof(iSum.substr(0,posX).c_str());<br />
if(tmp==0.0) return false;<br />
oFactors.push_back(tmp);<br />
oExponents.push_back(atof(iSum.substr(posH+1,iSum.length()).c_str()));<br />
}<br />
}<br />
return true;<br />
}</p>
<p>Ich hab schon lange gesucht abe rnoch keien Bibilothek gefunden.</p>
<p>Hab das vor einigen tagen selber geschrieben. Läuft aber irgendwie nicht richtig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087482</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jun 2006 10:14:32 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 10:22:44 GMT]]></title><description><![CDATA[<p>Ingless schrieb:</p>
<blockquote>
<p>Hab das vor einigen tagen selber geschrieben.</p>
</blockquote>
<p>Tut mir leid, aber das nehme ich dir nicht ab. Wer das geschrieben hat, braucht keine Erklärungen für die Stringfunktionen.</p>
<blockquote>
<p>Läuft aber irgendwie nicht richtig.</p>
</blockquote>
<p>Lies meine Signatur.</p>
<p>Es scheint noch Probleme zu geben, wenn man den Koeffizienten ganz weglässt. Aber ansonsten läuft das doch ganz gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087484</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 28 Jun 2006 10:22:44 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 11:13:51 GMT]]></title><description><![CDATA[<p>Kann es sein das dieser &quot;Fehler&quot; der eigentlich nicht da sein sollte von dem Programm kommt mit dem ich Programmiere?</p>
<p>Wir müssen Bordland benutzen und ich finde dieses Programm nicht gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087513</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087513</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 28 Jun 2006 11:13:51 GMT</pubDate></item><item><title><![CDATA[Reply to F(x)=x^2+nx+n Funktion auseinander nehmen on Wed, 28 Jun 2006 11:18:18 GMT]]></title><description><![CDATA[<p>Ingless schrieb:</p>
<blockquote>
<p>Kann es sein das dieser &quot;Fehler&quot; der eigentlich nicht da sein sollte von dem Programm kommt mit dem ich Programmiere?</p>
</blockquote>
<p>Da du immer noch nicht gesagt hast, wie dieser &quot;Fehler&quot; aussieht, kann ich da nur sagen: Vielleicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1087518</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1087518</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 28 Jun 2006 11:18:18 GMT</pubDate></item></channel></rss>