<?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[Mehrer chars zusammenfassen]]></title><description><![CDATA[<p>Hallo, ich habe mehrere chars aus denen ich einen einzigen machen will! Da ich die chars hochzähle kommen C++ Strings nicht in Frage.</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;iostream&gt;

int _tmain(int argc, _TCHAR* argv[])
{
	char ch1, ch2, ch3, ch4, ch5, ch6;

	for(ch1 = 'a'; ch1 &lt;= 'z'; ch1++)
		for(ch2 = 'a'; ch2 &lt;= 'z'; ch2++)
			for(ch3 = 'a'; ch3 &lt;= 'z'; ch3++)
				for(ch4 = 'a'; ch4 &lt;= 'z'; ch4++)
					for(ch5 = 'a'; ch5 &lt;= 'z'; ch5++)
						for(ch6 = 'a'; ch6 &lt;= 'z'; ch6++)
							std::cout &lt;&lt; ch1 &lt;&lt; ch2 &lt;&lt; ch3 &lt;&lt; ch4 &lt;&lt; ch5 &lt;&lt; ch6 &lt;&lt; std::endl; // Das funktioniert aber hier hätte ich gerne nur eine Variable!
	system(&quot;Pause&quot;);
	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/272832/mehrer-chars-zusammenfassen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 28 Aug 2026 14:39:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/272832.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Aug 2010 22:45:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mehrer chars zusammenfassen on Wed, 25 Aug 2010 22:45:41 GMT]]></title><description><![CDATA[<p>Hallo, ich habe mehrere chars aus denen ich einen einzigen machen will! Da ich die chars hochzähle kommen C++ Strings nicht in Frage.</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;iostream&gt;

int _tmain(int argc, _TCHAR* argv[])
{
	char ch1, ch2, ch3, ch4, ch5, ch6;

	for(ch1 = 'a'; ch1 &lt;= 'z'; ch1++)
		for(ch2 = 'a'; ch2 &lt;= 'z'; ch2++)
			for(ch3 = 'a'; ch3 &lt;= 'z'; ch3++)
				for(ch4 = 'a'; ch4 &lt;= 'z'; ch4++)
					for(ch5 = 'a'; ch5 &lt;= 'z'; ch5++)
						for(ch6 = 'a'; ch6 &lt;= 'z'; ch6++)
							std::cout &lt;&lt; ch1 &lt;&lt; ch2 &lt;&lt; ch3 &lt;&lt; ch4 &lt;&lt; ch5 &lt;&lt; ch6 &lt;&lt; std::endl; // Das funktioniert aber hier hätte ich gerne nur eine Variable!
	system(&quot;Pause&quot;);
	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1944422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944422</guid><dc:creator><![CDATA[ZeroOne]]></dc:creator><pubDate>Wed, 25 Aug 2010 22:45:41 GMT</pubDate></item><item><title><![CDATA[Reply to Mehrer chars zusammenfassen on Wed, 25 Aug 2010 22:54:18 GMT]]></title><description><![CDATA[<p>Du könntest doch ein char-Array aufbauen und davon das erste Element in der ersten Schleife hochzählen, das zweite in der zweiten Schleife usw.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944425</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Wed, 25 Aug 2010 22:54:18 GMT</pubDate></item><item><title><![CDATA[Reply to Mehrer chars zusammenfassen on Wed, 25 Aug 2010 22:58:56 GMT]]></title><description><![CDATA[<p>Wie wärs mit:</p>
<pre><code class="language-cpp">int main() 
{ 
    char blub[7];
    blub[6] = '\0';

    for(blub[0] = 'a'; blub[0] &lt;= 'z'; ++blub[0])
      for(blub[1] = 'a'; blub[1] &lt;= 'z'; ++blub[1])
        for(blub[2] = 'a'; blub[2] &lt;= 'z'; ++blub[2])
          for(blub[3] = 'a'; blub[3] &lt;= 'z'; ++blub[3])
            for(blub[4] = 'a'; blub[4] &lt;= 'z'; ++blub[4])
              for(blub[5] = 'a'; blub[5] &lt;= 'z'; ++blub[5])
                ; // whatever
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1944426</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944426</guid><dc:creator><![CDATA[dot]]></dc:creator><pubDate>Wed, 25 Aug 2010 22:58:56 GMT</pubDate></item><item><title><![CDATA[Reply to Mehrer chars zusammenfassen on Thu, 26 Aug 2010 08:09:57 GMT]]></title><description><![CDATA[<blockquote>
<p>Da ich die chars hochzähle kommen C++ Strings nicht in Frage.</p>
</blockquote>
<p>Das halte ich für ein Gerücht!<br />
Der oben genannte Ansatz geht auch mit einem C++ - String.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944494</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944494</guid><dc:creator><![CDATA[Athar]]></dc:creator><pubDate>Thu, 26 Aug 2010 08:09:57 GMT</pubDate></item><item><title><![CDATA[Reply to Mehrer chars zusammenfassen on Thu, 26 Aug 2010 08:10:59 GMT]]></title><description><![CDATA[<p>ZeroOne schrieb:</p>
<blockquote>
<p>Hallo, ich habe mehrere chars aus denen ich einen einzigen machen will!</p>
</blockquote>
<p>wtf?</p>
<p>ZeroOne schrieb:</p>
<blockquote>
<p>Da ich die chars hochzähle kommen C++ Strings nicht in Frage.</p>
</blockquote>
<p>wtf?</p>
<p>ZeroOne schrieb:</p>
<blockquote>
<pre><code class="language-cpp">int _tmain(int argc, _TCHAR* argv[])
{
	char ch1, ch2, ch3, ch4, ch5, ch6;

	for(ch1 = 'a'; ch1 &lt;= 'z'; ch1++)
		for(ch2 = 'a'; ch2 &lt;= 'z'; ch2++)
			for(ch3 = 'a'; ch3 &lt;= 'z'; ch3++)
				for(ch4 = 'a'; ch4 &lt;= 'z'; ch4++)
					for(ch5 = 'a'; ch5 &lt;= 'z'; ch5++)
						for(ch6 = 'a'; ch6 &lt;= 'z'; ch6++)
							std::cout &lt;&lt; ch1 &lt;&lt; ch2 &lt;&lt; ch3 &lt;&lt; ch4 &lt;&lt; ch5 &lt;&lt; ch6 &lt;&lt; std::endl; // Das funktioniert aber hier hätte ich gerne nur eine Variable!
	system(&quot;Pause&quot;);
	return 0;
}
</code></pre>
</blockquote>
<p>Ich verstehe die Frage jetzt so, dass Du nach einer eleganteren Variante suchst, die zur gleichen Ausgabe führt. So etwas ähnliches hatten wir gestern erst. Siehe <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-272797.html#1944309" rel="nofollow">hier</a> (btw: statt des vectors kann man da auch string nehmen :p ).</p>
<p>kk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1944495</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1944495</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Thu, 26 Aug 2010 08:10:59 GMT</pubDate></item></channel></rss>