<?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 Addition]]></title><description><![CDATA[<p>Hi</p>
<p>Ich möchte in meinem C++ Dll Source Strings vom Type char * addieren und dann dem Type LPSTR zuweisen! Wie mache ich das den am besten?</p>
<p>LG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/121606/string-addition</link><generator>RSS for Node</generator><lastBuildDate>Sat, 22 Aug 2026 20:50:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/121606.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 25 Sep 2005 18:16:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 18:16:00 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Ich möchte in meinem C++ Dll Source Strings vom Type char * addieren und dann dem Type LPSTR zuweisen! Wie mache ich das den am besten?</p>
<p>LG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/879902</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/879902</guid><dc:creator><![CDATA[*JoE*]]></dc:creator><pubDate>Sun, 25 Sep 2005 18:16:00 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 19:25:37 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Die Funktion strncpy ist zum Aneinanderhängen von C-Strings.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/879970</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/879970</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 25 Sep 2005 19:25:37 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 19:29:12 GMT]]></title><description><![CDATA[<p>Hallo,<br />
was genau meinst du mit addieren? Addieren im Sinne von zu einem zusammenfassen? - dann strcat<br />
Zuweisen machst du einfach mit opeartor =<br />
LPSTR sollte das selbe sein wie char*</p>
<pre><code class="language-cpp">char* c1 = &quot;test&quot;;
LPSTR c2 = c1;
</code></pre>
<p>Damit zeigt c2 jetzt auf c1.</p>
<p>Gruss,<br />
DeSoVoDaMu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/879978</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/879978</guid><dc:creator><![CDATA[DeSoVoDaMu]]></dc:creator><pubDate>Sun, 25 Sep 2005 19:29:12 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 19:55:53 GMT]]></title><description><![CDATA[<p>Hi DeSoVoDaMu</p>
<p>Ja ich meine Zusammenfassen.</p>
<pre><code class="language-cpp">LPSTR buf[2];
LPSTR a = &quot;a&quot;;
LPSTR b = &quot;b&quot;;
</code></pre>
<p>Wie füge ich nun a und b in buf ein?</p>
<p>LG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/879995</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/879995</guid><dc:creator><![CDATA[*JoE*]]></dc:creator><pubDate>Sun, 25 Sep 2005 19:55:53 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 20:03:23 GMT]]></title><description><![CDATA[<p>C-Style Strings aneinanderhaengen? Z. B. so:</p>
<pre><code class="language-cpp">char *AddCreateString (const char *szIn_1,
                       const char *szIn_2)
{
   char   *szReturn = NULL;

   if ((szIn_1 == NULL) || (szIn_2 == NULL))
        return NULL;

   szReturn = (char *) calloc (strlen (szIn_1) + strlen (szIn_2) + 1, sizeof (char));

   if (szReturn == NULL)
   {
        fprintf (stderr, &quot;alloc - failed\n&quot;);
        abort ();
   )
   else
   {
        sprintf (szReturn, &quot;%s%s&quot;, szIn_1, szIn_2);
        /* oder:
        strcpy (szReturn, szIn_1);
        strcat (szReturn, szIn_2);
        */
   }

   return szReturn;
}
</code></pre>
<p>Aber das gehoert eher ins ANSI-C Forum.</p>
<p>PS: Den Speicher des string musst Du spaeter natuerlich irgentwo wieder freigeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/880008</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/880008</guid><dc:creator><![CDATA[MBCS-CITP]]></dc:creator><pubDate>Sun, 25 Sep 2005 20:03:23 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 20:10:07 GMT]]></title><description><![CDATA[<p>hmm geht das nicht einfacher mit std::string?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/880010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/880010</guid><dc:creator><![CDATA[*JoE*]]></dc:creator><pubDate>Sun, 25 Sep 2005 20:10:07 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 20:30:51 GMT]]></title><description><![CDATA[<p>[JoE] schrieb:</p>
<blockquote>
<p>hmm geht das nicht einfacher mit std::string?</p>
</blockquote>
<p>Ja entschieden (Du hast ja nach &quot;char *&quot; Strings gefrag):</p>
<pre><code class="language-cpp">void AddString (      std::string    &amp;szStr_1,
                const std::string    &amp;szStr_2,
                const std::string    &amp;szStr_3;                    
{
    szStr_1 = szStr_2 + szStr_3;
}
</code></pre>
<p>Aber die Diskussion hierueber laeuft gerade auf Hochtouren:</p>
<p><a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-121535.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-121535.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/880016</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/880016</guid><dc:creator><![CDATA[MBCS-CITP]]></dc:creator><pubDate>Sun, 25 Sep 2005 20:30:51 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Sun, 25 Sep 2005 20:33:11 GMT]]></title><description><![CDATA[<p>jo die daten werden in type char * geliefert! Und ich muss sie auch an eine Funktion übergeben die Type char * hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/880019</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/880019</guid><dc:creator><![CDATA[*JoE*]]></dc:creator><pubDate>Sun, 25 Sep 2005 20:33:11 GMT</pubDate></item><item><title><![CDATA[Reply to String Addition on Mon, 26 Sep 2005 16:38:52 GMT]]></title><description><![CDATA[<p>DeSoVoDaMu schrieb:</p>
<blockquote>
<p>was genau meinst du mit addieren? Addieren im Sinne von zu einem zusammenfassen? - <strong>dann strcat</strong></p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/880648</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/880648</guid><dc:creator><![CDATA[DeSoVoDaMu]]></dc:creator><pubDate>Mon, 26 Sep 2005 16:38:52 GMT</pubDate></item></channel></rss>