<?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[editfeld in string]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich bin noch sehr neu in visual c++ mit borland, das nur mal vorweg. Ich hab hier ein editfeld, indem Personen ihren Spielernamen eingeben können. Diese eingabe soll in einem String gespeichert werden.</p>
<p>bis jetzt hab ich es so</p>
<pre><code class="language-cpp">string sp1_name;
string sp2_name;

//---------------------------------------------------------------------------
__fastcall TfrmMain::TfrmMain(TComponent* Owner)
	: TForm(Owner)
{

sp1_name = frmMain-&gt;edSpieler1-&gt;Text;
sp2_name = frmMain-&gt;edSpieler2-&gt;Text;
</code></pre>
<p>hier bekomm ich aber einen Fehler &quot; keine Übereinstimmung dür string::operator&quot;</p>
<p>danke für die hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/95770/editfeld-in-string</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 02:11:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/95770.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Dec 2004 08:47:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to editfeld in string on Thu, 23 Dec 2004 08:47:38 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich bin noch sehr neu in visual c++ mit borland, das nur mal vorweg. Ich hab hier ein editfeld, indem Personen ihren Spielernamen eingeben können. Diese eingabe soll in einem String gespeichert werden.</p>
<p>bis jetzt hab ich es so</p>
<pre><code class="language-cpp">string sp1_name;
string sp2_name;

//---------------------------------------------------------------------------
__fastcall TfrmMain::TfrmMain(TComponent* Owner)
	: TForm(Owner)
{

sp1_name = frmMain-&gt;edSpieler1-&gt;Text;
sp2_name = frmMain-&gt;edSpieler2-&gt;Text;
</code></pre>
<p>hier bekomm ich aber einen Fehler &quot; keine Übereinstimmung dür string::operator&quot;</p>
<p>danke für die hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/679263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679263</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 23 Dec 2004 08:47:38 GMT</pubDate></item><item><title><![CDATA[Reply to editfeld in string on Thu, 23 Dec 2004 08:53:46 GMT]]></title><description><![CDATA[<p>Pierre|rlp schrieb:</p>
<blockquote>
<p>ich bin noch sehr neu in visual c++ mit borland</p>
</blockquote>
<p>Scheint so, sonst wüsstest Du wohl, dass Visual C++ von Microsoft ist. Das entsprechende Borland-Produkt heißt C++ Builder.</p>
<p>Falls Du den BCB (Borland C++ Builder) verwendest, könnte es hilfreich sein, anstatt string AnsiString zu verwenden.</p>
<pre><code class="language-cpp">AnsiString sp1_name;
AnsiString sp2_name;
</code></pre>
<p>Schau Dir am besten auch mal die Hilfe zu TEdit usw. an. Die Text/Caption-Eigenschaft in VCL-Komponenten sind üblicherweise vom Typ<br />
AnsiString. Und natürlich solltest Du Dir auch die Hilfe zu AnsiString anschauen.</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/679269</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679269</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Thu, 23 Dec 2004 08:53:46 GMT</pubDate></item><item><title><![CDATA[Reply to editfeld in string on Thu, 23 Dec 2004 09:03:07 GMT]]></title><description><![CDATA[<p>Du hast sogar recht, es hat funktioniert. Ja stimmt, ich nutzte borland. Kennst du nicht zufällig tutorials oder so zu borland c++. weil ich blick noch nicht ganz durch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/679278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679278</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 23 Dec 2004 09:03:07 GMT</pubDate></item><item><title><![CDATA[Reply to editfeld in string on Thu, 23 Dec 2004 09:05:28 GMT]]></title><description><![CDATA[<p>Eine andere Möglichkeit wäre:</p>
<pre><code class="language-cpp">sp1_name = frmMain-&gt;edSpieler1-&gt;Text.c_str();
</code></pre>
<p>c_str() liefert einen const char* zurück, wodurch die Zuweisung an std::string wieder möglich wird <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/679281</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679281</guid><dc:creator><![CDATA[PuppetMaster2k]]></dc:creator><pubDate>Thu, 23 Dec 2004 09:05:28 GMT</pubDate></item><item><title><![CDATA[Reply to editfeld in string on Thu, 23 Dec 2004 09:37:59 GMT]]></title><description><![CDATA[<p>och Marcel machs mir doch nihct kompilzierter als es eh schon ist</p>
]]></description><link>https://www.c-plusplus.net/forum/post/679303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679303</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 23 Dec 2004 09:37:59 GMT</pubDate></item><item><title><![CDATA[Reply to editfeld in string on Thu, 23 Dec 2004 10:06:11 GMT]]></title><description><![CDATA[<p>Komplizierter wird dadurch nichts.</p>
<p>Achja, das frmMain-&gt; kannst du dir sparen, wenn edSpieler1 und edSpieler2 zu frmMain gehören.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/679333</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/679333</guid><dc:creator><![CDATA[PuppetMaster2k]]></dc:creator><pubDate>Thu, 23 Dec 2004 10:06:11 GMT</pubDate></item></channel></rss>