<?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[LPCSTR - Problem]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich brauche einen LPCSTR-Pointer auf den Inhalt des<br />
Arrays testarr, damit bei z.B.</p>
<p>char testarr[3];<br />
testarr[0]=&quot;A&quot;;<br />
testarr[1]=&quot;B&quot;;<br />
testarr[2]=&quot;C&quot;;</p>
<p>der Pointer den gleichen Wert hat, als wenn er direkt mit<br />
LPCSTR ptest = &quot;ABC&quot;;<br />
initialisiert worden wäre.</p>
<p>Für die Erfahrenen sicher ein Kinderspiel...</p>
<p>Danke im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/6414/lpcstr-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 01:44:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/6414.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Jun 2003 19:47:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to LPCSTR - Problem on Sun, 29 Jun 2003 19:47:00 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich brauche einen LPCSTR-Pointer auf den Inhalt des<br />
Arrays testarr, damit bei z.B.</p>
<p>char testarr[3];<br />
testarr[0]=&quot;A&quot;;<br />
testarr[1]=&quot;B&quot;;<br />
testarr[2]=&quot;C&quot;;</p>
<p>der Pointer den gleichen Wert hat, als wenn er direkt mit<br />
LPCSTR ptest = &quot;ABC&quot;;<br />
initialisiert worden wäre.</p>
<p>Für die Erfahrenen sicher ein Kinderspiel...</p>
<p>Danke im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31129</guid><dc:creator><![CDATA[Gast]]></dc:creator><pubDate>Sun, 29 Jun 2003 19:47:00 GMT</pubDate></item><item><title><![CDATA[Reply to LPCSTR - Problem on Sun, 29 Jun 2003 20:06:00 GMT]]></title><description><![CDATA[<p>LPCSTR ptest = testarr;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31130</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31130</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Sun, 29 Jun 2003 20:06:00 GMT</pubDate></item><item><title><![CDATA[Reply to LPCSTR - Problem on Tue, 01 Jul 2003 20:20:00 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte einen CString str=&quot;test&quot; mittels str.c_str() in einen const char*<br />
umwandeln (= LPCSTR). Welchen Header muß ich einbinden oder gibt es eine andere Funktion?<br />
Ohne Einbinden kennt Visual die Methode c_str() garnicht.</p>
<p>Hoffnungsvoll...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31131</guid><dc:creator><![CDATA[Gast]]></dc:creator><pubDate>Tue, 01 Jul 2003 20:20:00 GMT</pubDate></item><item><title><![CDATA[Reply to LPCSTR - Problem on Tue, 01 Jul 2003 20:49:00 GMT]]></title><description><![CDATA[<p>CString hat kein c_str() .</p>
<p>Versuch mal static_cast&lt;LPCSTR&gt;(str);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31132</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Tue, 01 Jul 2003 20:49:00 GMT</pubDate></item><item><title><![CDATA[Reply to LPCSTR - Problem on Tue, 01 Jul 2003 22:13:00 GMT]]></title><description><![CDATA[<p>Hallo Michael,</p>
<p>die Sache läßt sich ohne Fehlermeldung kompilieren.<br />
CString str = &quot;test&quot;;<br />
static_cast&lt;LPCSTR&gt;(str);</p>
<p>Ich lasse zur Kontrolle nach dem cast den Wert ausgeben, aber dann steht nicht &quot;test&quot; drin, sondern &quot;ÝÝÝÝÝÝÝÝÝ&quot;<br />
Woran könnte das liegen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31133</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31133</guid><dc:creator><![CDATA[Gast]]></dc:creator><pubDate>Tue, 01 Jul 2003 22:13:00 GMT</pubDate></item><item><title><![CDATA[Reply to LPCSTR - Problem on Wed, 02 Jul 2003 07:19:00 GMT]]></title><description><![CDATA[<p>CString str = &quot;test&quot;;<br />
LPCSTR t = static_cast&lt;LPCSTR&gt;(str);</p>
<p>Wenn eine Methode ein LPCSTR erwartet kannst Du den CString einfach übergeben.</p>
<p>void test(LPCSTR)<br />
{<br />
...<br />
}</p>
<p>test(str);</p>
<p>[ Dieser Beitrag wurde am 02.07.2003 um 09:21 Uhr von <strong>Knuddlbaer</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31134</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Wed, 02 Jul 2003 07:19:00 GMT</pubDate></item><item><title><![CDATA[Reply to LPCSTR - Problem on Wed, 02 Jul 2003 07:55:00 GMT]]></title><description><![CDATA[<p>Danke für Deine Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31135</guid><dc:creator><![CDATA[Gast]]></dc:creator><pubDate>Wed, 02 Jul 2003 07:55:00 GMT</pubDate></item></channel></rss>