<?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[String + string + #define problem]]></title><description><![CDATA[<p>Guten Morgen,<br />
Ich habe vor einen String zu verketten.</p>
<p>Definiert wurde:</p>
<p>#define DEFINIERUNG_TEST &quot;Forum&quot;</p>
<p>...<br />
string str1 = &quot; liebes &quot;<br />
string str2 = &quot;Guten Morgen &quot; +str1 + DEFINIERUNG_TEST ;</p>
<p>Wieso funktioniert der Code nicht?</p>
<p>Fehler: error: invalid operands of types ...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/204994/string-string-define-problem</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 22:05:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/204994.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Feb 2008 07:35:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String + string + #define problem on Sat, 09 Feb 2008 07:35:51 GMT]]></title><description><![CDATA[<p>Guten Morgen,<br />
Ich habe vor einen String zu verketten.</p>
<p>Definiert wurde:</p>
<p>#define DEFINIERUNG_TEST &quot;Forum&quot;</p>
<p>...<br />
string str1 = &quot; liebes &quot;<br />
string str2 = &quot;Guten Morgen &quot; +str1 + DEFINIERUNG_TEST ;</p>
<p>Wieso funktioniert der Code nicht?</p>
<p>Fehler: error: invalid operands of types ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452393</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452393</guid><dc:creator><![CDATA[string...]]></dc:creator><pubDate>Sat, 09 Feb 2008 07:35:51 GMT</pubDate></item><item><title><![CDATA[Reply to String + string + #define problem on Sat, 09 Feb 2008 07:42:38 GMT]]></title><description><![CDATA[<p>Ok, es ist zu frph am Morgen, Fehler gefunden <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/1452397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452397</guid><dc:creator><![CDATA[string...]]></dc:creator><pubDate>Sat, 09 Feb 2008 07:42:38 GMT</pubDate></item><item><title><![CDATA[Reply to String + string + #define problem on Sat, 09 Feb 2008 08:52:44 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ja der Fehler ist die Verwendung von #define anstelle einer echten typisierten Konstante.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452407</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452407</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 09 Feb 2008 08:52:44 GMT</pubDate></item><item><title><![CDATA[Reply to String + string + #define problem on Sat, 09 Feb 2008 10:26:22 GMT]]></title><description><![CDATA[<p>akari schrieb:</p>
<blockquote>
<p>Ja der Fehler ist die Verwendung von #define anstelle einer echten typisierten Konstante.</p>
</blockquote>
<p>Sicher? Ich würde eher sagen, dass der String &quot;Guten Morgen&quot; eben ein std::string sein müsste, char-Pointer (auch wenn sie mit #define dahingesetzt wurden) können doch dann endlos drangesetzt werden. (?)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452440</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452440</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Sat, 09 Feb 2008 10:26:22 GMT</pubDate></item><item><title><![CDATA[Reply to String + string + #define problem on Sat, 09 Feb 2008 10:43:42 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Natürlich läßt sich technisch das ganze auch mit defines machen, mir ging es darum das in C++ defines nicht als Ersatz für echte Konstanten genommen werden sollten.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452447</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 09 Feb 2008 10:43:42 GMT</pubDate></item></channel></rss>