<?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[Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen?]]></title><description><![CDATA[<p>Hi,</p>
<p>ich habe einen String &quot;abcd&quot;. Wie kann ich alle Kombinationen per Programm durchgehen?</p>
<p>also acbd, bcda, dcba usw...</p>
<p>Wäre toll, wenn mal jemand Pseudocode posten könnte.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/193639/wie-kann-man-alle-buchstabenkombinationen-einer-strings-herauskriegen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 17:31:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/193639.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Sep 2007 08:43:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 08:43:25 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich habe einen String &quot;abcd&quot;. Wie kann ich alle Kombinationen per Programm durchgehen?</p>
<p>also acbd, bcda, dcba usw...</p>
<p>Wäre toll, wenn mal jemand Pseudocode posten könnte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374235</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374235</guid><dc:creator><![CDATA[roflcopterpilot]]></dc:creator><pubDate>Fri, 28 Sep 2007 08:43:25 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 08:48:14 GMT]]></title><description><![CDATA[<p>In C++: next_permutation() (ich glaube, im C++ Board ist neulich ein &quot;next_combination()&quot; aufgetaucht)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374240</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 28 Sep 2007 08:48:14 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 09:00:46 GMT]]></title><description><![CDATA[<p>danke für die schnelle hilfe.</p>
<p>kannst du mir vielleicht mal ein beispiel für die funktion geben? ich frage mich, wie man mitbekommnt wann alle kombinationen durchlaufen sind.</p>
<p>gibts sowas auch in c#?</p>
<p>bist ein schatz, cStoll <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374245</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374245</guid><dc:creator><![CDATA[roflcopterpilot]]></dc:creator><pubDate>Fri, 28 Sep 2007 09:00:46 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 09:13:33 GMT]]></title><description><![CDATA[<p>roflcopterpilot schrieb:</p>
<blockquote>
<p>kannst du mir vielleicht mal ein beispiel für die funktion geben? ich frage mich, wie man mitbekommnt wann alle kombinationen durchlaufen sind.</p>
</blockquote>
<p>Klar:</p>
<pre><code class="language-cpp">string text = &quot;abcd&quot;;
//um wirklich alle Permutationen zu erwischen, mußt du mit sortierter Reihenfolge starten, s.u.
while(next_permutaion(text.begin(),text.end()))
  cout&lt;&lt;text&lt;&lt;endl;
</code></pre>
<p>next_permutation() liefert false zurück, wenn es &quot;überläuft&quot; von der höchsten Permutaion &quot;dcba&quot; zur niedrigsten &quot;abcd&quot;, ansonsten true.</p>
<blockquote>
<p>gibts sowas auch in c#?</p>
</blockquote>
<p>Keine Ahnung, das müsstest du die C#-ler fragen.<br />
(Alternativ - du nimmst dir die &lt;algorithm&gt; vor und schaust dir an, wie np arbeitet, dann kannst du die Lösung nach C# übersetzen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374248</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 28 Sep 2007 09:13:33 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 10:38:53 GMT]]></title><description><![CDATA[<p>Hey CStoll,</p>
<p>kannst du mir sagen welche Library ich einbinden muss, damit die next_permutation-Funktion funktioniert?</p>
<p>Ich benutze DevCpp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374302</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374302</guid><dc:creator><![CDATA[roflcopterpilot]]></dc:creator><pubDate>Fri, 28 Sep 2007 10:38:53 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 10:53:06 GMT]]></title><description><![CDATA[<p>Klar - der bereits oben erwähnte Header &lt;algorthm&gt; (und &lt;string&gt; für die std::string Klasse).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374312</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 28 Sep 2007 10:53:06 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 11:02:18 GMT]]></title><description><![CDATA[<p>hi cstoll,</p>
<p>leider klappts nicht.</p>
<p>hier der code:</p>
<pre><code>#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;algorithm&gt;
#include &lt;functional&gt;
#include &lt;vector&gt;
#include &lt;string&gt;

using namespace std;

int main(int argc, char *argv[])
{
string text = &quot;abcd&quot;; 
while(next_permutaion(text.begin(),text.end())) 
  cout&lt;&lt;text&lt;&lt;endl;
    system(&quot;PAUSE&quot;);
    return EXIT_SUCCESS;
}
}
</code></pre>
<p>die Fehlermeldung lautet:<br />
13 C:\Dokumente und Einstellungen\Schüler.C119-100\Desktop\dev\Dev-CppPortable\App\devcpp\main.cpp `next_permutaion' undeclared (first use this function)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374318</guid><dc:creator><![CDATA[roflcopterpilot]]></dc:creator><pubDate>Fri, 28 Sep 2007 11:02:18 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 11:05:59 GMT]]></title><description><![CDATA[<p>Du hast einen Tipfehler in 'next_permuta<strong>t</strong>ion'</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374321</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374321</guid><dc:creator><![CDATA[Kenner der Algorithmen]]></dc:creator><pubDate>Fri, 28 Sep 2007 11:05:59 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man alle Buchstabenkombinationen einer Strings herauskriegen? on Fri, 28 Sep 2007 11:12:52 GMT]]></title><description><![CDATA[<p>ok danke, jetzt klappts <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374325</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374325</guid><dc:creator><![CDATA[roflcopterpilot]]></dc:creator><pubDate>Fri, 28 Sep 2007 11:12:52 GMT</pubDate></item></channel></rss>