<?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[TStringList Frage]]></title><description><![CDATA[<p>Also ich verwende TSTringListen, mit dem Befehl Add kann man ja objekte hinzufügen, kann man aber auch mehrere Variablen an den Add Befehl senden.<br />
So z.B. TSTringList-&gt;Add(String+int+float)<br />
Aber mit + und Komma fukntioniert das nicht, kann man das realisieren, denn ich möchte das ich eine TStringList in eine txt speichere und dabei in jeder Zeile soetwas steht wie:<br />
int Variable +&quot;=&quot;+String<br />
geht das irgendwie?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/109970/tstringlist-frage</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 13:52:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/109970.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 May 2005 08:56:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 08:56:50 GMT]]></title><description><![CDATA[<p>Also ich verwende TSTringListen, mit dem Befehl Add kann man ja objekte hinzufügen, kann man aber auch mehrere Variablen an den Add Befehl senden.<br />
So z.B. TSTringList-&gt;Add(String+int+float)<br />
Aber mit + und Komma fukntioniert das nicht, kann man das realisieren, denn ich möchte das ich eine TStringList in eine txt speichere und dabei in jeder Zeile soetwas steht wie:<br />
int Variable +&quot;=&quot;+String<br />
geht das irgendwie?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/789391</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789391</guid><dc:creator><![CDATA[Kevinus]]></dc:creator><pubDate>Mon, 16 May 2005 08:56:50 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 09:29:06 GMT]]></title><description><![CDATA[<p>Versuche es mal mit der Funktion IntToStr bei der Integer Variable.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/789416</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789416</guid><dc:creator><![CDATA[Seth_99]]></dc:creator><pubDate>Mon, 16 May 2005 09:29:06 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 09:36:55 GMT]]></title><description><![CDATA[<p>Das klappt ja alles wenn ich Add mit nur einer Variable verbinde, egal ob int float oder String, aber ich möchte menrere Variablen verbinden und das ist mein eignetliches Anliegen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/789424</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789424</guid><dc:creator><![CDATA[Kevinus]]></dc:creator><pubDate>Mon, 16 May 2005 09:36:55 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 09:57:03 GMT]]></title><description><![CDATA[<p>Beispiel-Code:</p>
<pre><code class="language-cpp">TStringList *list=new TStringList();
int        Variable =5;
AnsiString Variable2=&quot;Test&quot;;
list-&gt;Add(IntToStr(Variable)+&quot; = &quot;+Variable2);
ShowMessage(list-&gt;Strings[0]);
</code></pre>
<p>Also wenn du es so meinst, funktioniert es doch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/789439</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789439</guid><dc:creator><![CDATA[Seth_99]]></dc:creator><pubDate>Mon, 16 May 2005 09:57:03 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 10:10:39 GMT]]></title><description><![CDATA[<p>Achja? Das hhatte ich probiert mach es aber nochmal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/789446</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789446</guid><dc:creator><![CDATA[Kevinus]]></dc:creator><pubDate>Mon, 16 May 2005 10:10:39 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 10:17:38 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">//---------------------------------------------------------------------------
#include &lt;vcl\vcl.h&gt;
#include &lt;iostream&gt;
#include &lt;stdlib.h&gt;
#include &lt;conio.h&gt;
#pragma hdrstop
//---------------------------------------------------------------------------
USERES(&quot;Vorspann.res&quot;);
//---------------------------------------------------------------------------
int main()
{
TStringList *ASCIITastencode;
String NameDerTaste;
int ASCIITaste;
//---------------------------------------------------------------------------
ASCIITastencode=new TStringList;
system(&quot;cls&quot;);
cout &lt;&lt;&quot;-----------------------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Dieses Programm gibt, nachdem sie eine Taste gedr\x084\ckt&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;haben, dem ASCII Code aus und speichert ihn in der&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Textdatei ASCII.TXT. Wenn sie die Abfrage beenden&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;wollen, geben sie bei der Bezeichnung 'END' ein.&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Version: 1.0	                 By: Kevin Jakob&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;-----------------------------------------------------&quot;&quot;\n&quot;;
system(&quot;Pause&quot;);
while(true)
{
system(&quot;cls&quot;);
ASCIITaste=getch();
cout &lt;&lt;&quot;---------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;ASCII Code dieser Taste : &quot;&lt;&lt;ASCIITaste&lt;&lt;&quot;\n&quot;;
cout &lt;&lt;&quot;---------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Wie ist die Bezeichung f\x081r diese Taste?&quot;&quot;\n&quot;;
cin  &gt;&gt;NameDerTaste;
cout &lt;&lt;&quot;---------------------------------------&quot;&quot;\n&quot;;
if(NameDerTaste==&quot;END&quot; || NameDerTaste==&quot;End&quot;)
{
break;
}
ASCIITastencode-&gt;Add(IntToStr(ASCIITaste)+&quot;		=&quot;+NameDerTaste);
}
ASCIITastencode-&gt;SaveToFile(&quot;ASCII.txt&quot;);
cout &lt;&lt;&quot;------------------------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Beim n\x084\chsten Programmstart wird die Datei \x081\berschrieben!&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;------------------------------------------------------&quot;&quot;\n&quot;;
system(&quot;Pause&quot;);
return 0;
}
</code></pre>
<p>So das wäre der Quellcode, also das mit TStringList geht jetzt, jedoch wenn ich bei cin &gt;&gt;NameDerTaste; angekommen bin, bleibt er dort steckenich kann zwar etwas eingeben doch er springt immer eine Zeile nach unten. Liegt das vielleicht ich vcl.h includiert habe und dieser String nicht mit cin zusammenarbeitet??? Wenn ich nämlich string.h includiere muss ich &quot;String Variable&quot; klein schreiben statt wie jetzt groß. Und dann geht das mit cin doch das mit TStringList, wie oben beschrieben funktioniert nicht mehr. Ich bitte um Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/789450</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789450</guid><dc:creator><![CDATA[Kevinus]]></dc:creator><pubDate>Mon, 16 May 2005 10:17:38 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 10:32:48 GMT]]></title><description><![CDATA[<p>Das Problem ist, dass 'cin' nicht mit AnsiString bzw. String arbeitet.<br />
Gibt dein Compiler keine Fehlermeldung aus?<br />
Wenn ich mich nicht irre, kannst du das bloß mit char umgehen.</p>
<p>Bei mir klappt das so:</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------
#include &lt;vcl\vcl.h&gt;
#include &lt;iostream.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;conio.h&gt;
#pragma hdrstop
//---------------------------------------------------------------------------
USERES(&quot;Vorspann.res&quot;);
//---------------------------------------------------------------------------
int main()
{
TStringList *ASCIITastencode;
char NameDerTaste[30];
int ASCIITaste;
//---------------------------------------------------------------------------
ASCIITastencode=new TStringList;
system(&quot;cls&quot;);
cout &lt;&lt;&quot;-----------------------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Dieses Programm gibt, nachdem sie eine Taste gedr\x084\ckt&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;haben, dem ASCII Code aus und speichert ihn in der&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Textdatei ASCII.TXT. Wenn sie die Abfrage beenden&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;wollen, geben sie bei der Bezeichnung 'END' ein.&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Version: 1.0                     By: Kevin Jakob&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;-----------------------------------------------------&quot;&quot;\n&quot;;
system(&quot;Pause&quot;);
while(true)
{
system(&quot;cls&quot;);
ASCIITaste=getch();
cout &lt;&lt;&quot;---------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;ASCII Code dieser Taste : &quot;&lt;&lt;ASCIITaste&lt;&lt;&quot;\n&quot;;
cout &lt;&lt;&quot;---------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Wie ist die Bezeichung f\x081r diese Taste?&quot;&quot;\n&quot;;
cin  &gt;&gt; NameDerTaste;
cout &lt;&lt;&quot;---------------------------------------&quot;&quot;\n&quot;;
if(!strcmp(NameDerTaste,&quot;END&quot;))break;
ASCIITastencode-&gt;Add(IntToStr(ASCIITaste)+&quot;        =&quot;+AnsiString(NameDerTaste));
}
ASCIITastencode-&gt;SaveToFile(&quot;ASCII.txt&quot;);
cout &lt;&lt;&quot;------------------------------------------------------&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;Beim n\x084\chsten Programmstart wird die Datei \x081\berschrieben!&quot;&quot;\n&quot;;
cout &lt;&lt;&quot;------------------------------------------------------&quot;&quot;\n&quot;;
system(&quot;Pause&quot;);
return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/789461</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789461</guid><dc:creator><![CDATA[Seth_99]]></dc:creator><pubDate>Mon, 16 May 2005 10:32:48 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Mon, 16 May 2005 10:46:22 GMT]]></title><description><![CDATA[<p>Danke aber ich habe ein Reines Dosprogramm gemacht, indem ich &lt;string&gt; includiere und darunter hab ich dann using namespace std; oder soähnlich geschrieben. Mit diesem String, der klein geschrieben wird(also string Variable)konnte ich cin verwenden. Besteht ein Unterschied zwischen String aus vcl.h und string aus &lt;string&gt;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/789466</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/789466</guid><dc:creator><![CDATA[Kevinus]]></dc:creator><pubDate>Mon, 16 May 2005 10:46:22 GMT</pubDate></item><item><title><![CDATA[Reply to TStringList Frage on Wed, 18 May 2005 06:56:29 GMT]]></title><description><![CDATA[<p>wenn du reine konsolenprogramme schreibst, benötigst du schon mal keine vcl, dann kannst du direkt im c/c++ forum nachfragen.</p>
<p>String (AnsiString) ist die VCL-Stringklasse, während string zum C++-Standard gehört.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/790354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/790354</guid><dc:creator><![CDATA[Sunday]]></dc:creator><pubDate>Wed, 18 May 2005 06:56:29 GMT</pubDate></item></channel></rss>