<?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[Variable in einer Vsriablen]]></title><description><![CDATA[<p>Hallo an alle,</p>
<p>ich habe eine Frage:<br />
Ich möchte gerne in eine Variable eine Variable einfügen.<br />
Beispiel:</p>
<pre><code class="language-cpp">char buffer2[256] = &quot;C:\\Dokumente und Einstellungen\\&quot;die_variable_user_name&quot;\\Desktop&quot;;
</code></pre>
<p>Wie ist dies möglich?<br />
Ich möchte es NICHT ausgeben.</p>
<p>Gruß Jermuk</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/241748/variable-in-einer-vsriablen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 07:47:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/241748.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 May 2009 14:54:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Variable in einer Vsriablen on Mon, 25 May 2009 14:54:48 GMT]]></title><description><![CDATA[<p>Hallo an alle,</p>
<p>ich habe eine Frage:<br />
Ich möchte gerne in eine Variable eine Variable einfügen.<br />
Beispiel:</p>
<pre><code class="language-cpp">char buffer2[256] = &quot;C:\\Dokumente und Einstellungen\\&quot;die_variable_user_name&quot;\\Desktop&quot;;
</code></pre>
<p>Wie ist dies möglich?<br />
Ich möchte es NICHT ausgeben.</p>
<p>Gruß Jermuk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715517</guid><dc:creator><![CDATA[Jermuk]]></dc:creator><pubDate>Mon, 25 May 2009 14:54:48 GMT</pubDate></item><item><title><![CDATA[Reply to Variable in einer Vsriablen on Mon, 25 May 2009 14:59:43 GMT]]></title><description><![CDATA[<p>du hast die wahl:<br />
entweder sprintf oder strncat solltest du nehmen</p>
<p>so sieht das mit sprintf aus:</p>
<pre><code class="language-cpp">sprintf(buffer, &quot;C:\\BlaBla\\%s\\sonstwas&quot;, die_variable_user_name);
</code></pre>
<p>strncat fügt jeweils 2 strings zusammen, deswegen ist es damit etwas umständlicher</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715520</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715520</guid><dc:creator><![CDATA[player424]]></dc:creator><pubDate>Mon, 25 May 2009 14:59:43 GMT</pubDate></item><item><title><![CDATA[Reply to Variable in einer Vsriablen on Mon, 25 May 2009 15:00:32 GMT]]></title><description><![CDATA[<p>Am einfachsten geht dies, wenn du <code>std::string</code> verwendest und nicht irgendwelche C Char Arrays:</p>
<pre><code class="language-cpp">std::string username = &quot;default user&quot;;
std::string buffer = &quot;C:\\Dokumente und Einstellungen\\&quot; + username + &quot;\\Desktop&quot;;
</code></pre>
<p>Referenz: <a href="http://www.cplusplus.com/reference/string/" rel="nofollow">http://www.cplusplus.com/reference/string/</a></p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715521</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715521</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Mon, 25 May 2009 15:00:32 GMT</pubDate></item><item><title><![CDATA[Reply to Variable in einer Vsriablen on Mon, 25 May 2009 15:03:28 GMT]]></title><description><![CDATA[<p>Du koenntest c++ und seine Strings benutzen (hier Pseudocode):</p>
<pre><code class="language-cpp">std::string pre = &quot;Meine Welt&quot;;
std::string infix = &quot;Unsere Welt&quot;;
std::string postfix = &quot;Deine Welt&quot;;

std::string alles = pre + infix + postfix;
alles.c_str() &lt;- liefer einen C-String bzw. char-Array
</code></pre>
<p>PS: wieder zu langsam ... und frage mich nicht nach Unicode-Zeichen ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715523</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Mon, 25 May 2009 15:03:28 GMT</pubDate></item><item><title><![CDATA[Reply to Variable in einer Vsriablen on Mon, 25 May 2009 15:49:31 GMT]]></title><description><![CDATA[<p>Vielen Dank!</p>
<p>Gruß Jermuk</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1715561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1715561</guid><dc:creator><![CDATA[Jermuk]]></dc:creator><pubDate>Mon, 25 May 2009 15:49:31 GMT</pubDate></item></channel></rss>