<?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[EStringListError - &#x27;List index out of bounds(1)&#x27;]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe eine ListBox, in der etwas drin steht. und zwar in dieser art:</p>
<p>'Datum Zeit: Thema<br />
Datum Zeit: Thema<br />
.<br />
.<br />
.'</p>
<p>und so weiter ....</p>
<p>nun will ich jeweils Datum und Zeit auslesen, da ich eine Ini-Datei angelegt habe, die nach Datum und Zeit benannt ist und aus der dann das Thema ausgelesen werden soll.</p>
<p>Das habe ich folgendermaßen geregelt:</p>
<pre><code class="language-cpp">for(int j = 1; j &lt;= ListBox1-&gt;Items-&gt;Count; j++){
      Dates[j] = ListBox1-&gt;Items-&gt;Strings[j];
      int countfordate = 1;
      if(Dates[j][countfordate] != ' '){
         Datumsausgabe = Datumsausgabe + Dates[j][countfordate];
         countfordate++;
      }
      int countfortime = countfordate + 1;
      if(Dates[j][countfortime] != ' '){
         Zeitausgabe = Zeitausgabe + Dates[j][countfortime];
         countfortime++;
      }
   }
   for (int i = 1; i &lt;= Zeitausgabe.Length(); i++){
      if(Zeitausgabe[i] == ':'){
         Zeitausgabe[i] = '.';
      }
   }
   Jetzt = Datumsausgabe + &quot; &quot; + Zeitausgabe;
   ini = new TIniFile(dir + &quot;\\Termine\\&quot; + Jetzt + &quot;.ini&quot;);
      what = ini-&gt;ReadString(&quot;Termine&quot;,&quot;Was&quot;,&quot;&quot;);
      Edit5-&gt;Text = ini-&gt;ReadString(&quot;Termine&quot;,&quot;Erinnerung&quot;,&quot;&quot;);
   delete ini;
</code></pre>
<p>er kompiliert das auch ohne Probleme, allerdings bekomme ich dann einen Fehler:</p>
<blockquote>
<p>EStringListError with Message 'List index out of bounds(1)'</p>
</blockquote>
<p>kann mir jemand sagen, was ich falsch mache?? finde den fehler selber nicht und beim debugger seh ich nur, dass es diese Zeile sein muss:</p>
<pre><code class="language-cpp">Dates[j] = ListBox1-&gt;Items-&gt;Strings[j];
</code></pre>
<p>die ja direkt von der for-schleife aus geleitet ist.</p>
<p>Danke schonmal für die Hilfe.</p>
<p>Gruß<br />
MWJK</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/168583/estringlisterror-list-index-out-of-bounds-1</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 11:59:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/168583.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 Dec 2006 19:52:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to EStringListError - &#x27;List index out of bounds(1)&#x27; on Sun, 24 Dec 2006 19:52:28 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe eine ListBox, in der etwas drin steht. und zwar in dieser art:</p>
<p>'Datum Zeit: Thema<br />
Datum Zeit: Thema<br />
.<br />
.<br />
.'</p>
<p>und so weiter ....</p>
<p>nun will ich jeweils Datum und Zeit auslesen, da ich eine Ini-Datei angelegt habe, die nach Datum und Zeit benannt ist und aus der dann das Thema ausgelesen werden soll.</p>
<p>Das habe ich folgendermaßen geregelt:</p>
<pre><code class="language-cpp">for(int j = 1; j &lt;= ListBox1-&gt;Items-&gt;Count; j++){
      Dates[j] = ListBox1-&gt;Items-&gt;Strings[j];
      int countfordate = 1;
      if(Dates[j][countfordate] != ' '){
         Datumsausgabe = Datumsausgabe + Dates[j][countfordate];
         countfordate++;
      }
      int countfortime = countfordate + 1;
      if(Dates[j][countfortime] != ' '){
         Zeitausgabe = Zeitausgabe + Dates[j][countfortime];
         countfortime++;
      }
   }
   for (int i = 1; i &lt;= Zeitausgabe.Length(); i++){
      if(Zeitausgabe[i] == ':'){
         Zeitausgabe[i] = '.';
      }
   }
   Jetzt = Datumsausgabe + &quot; &quot; + Zeitausgabe;
   ini = new TIniFile(dir + &quot;\\Termine\\&quot; + Jetzt + &quot;.ini&quot;);
      what = ini-&gt;ReadString(&quot;Termine&quot;,&quot;Was&quot;,&quot;&quot;);
      Edit5-&gt;Text = ini-&gt;ReadString(&quot;Termine&quot;,&quot;Erinnerung&quot;,&quot;&quot;);
   delete ini;
</code></pre>
<p>er kompiliert das auch ohne Probleme, allerdings bekomme ich dann einen Fehler:</p>
<blockquote>
<p>EStringListError with Message 'List index out of bounds(1)'</p>
</blockquote>
<p>kann mir jemand sagen, was ich falsch mache?? finde den fehler selber nicht und beim debugger seh ich nur, dass es diese Zeile sein muss:</p>
<pre><code class="language-cpp">Dates[j] = ListBox1-&gt;Items-&gt;Strings[j];
</code></pre>
<p>die ja direkt von der for-schleife aus geleitet ist.</p>
<p>Danke schonmal für die Hilfe.</p>
<p>Gruß<br />
MWJK</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1197477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1197477</guid><dc:creator><![CDATA[MWJK]]></dc:creator><pubDate>Sun, 24 Dec 2006 19:52:28 GMT</pubDate></item><item><title><![CDATA[Reply to EStringListError - &#x27;List index out of bounds(1)&#x27; on Sun, 24 Dec 2006 21:14:48 GMT]]></title><description><![CDATA[<p>die Zählung beginnt bei den VCL-Objekten bei 0 und geht immer bis Count-1</p>
<pre><code>for(int j = [b]0[/b]; j [b]&lt;[/b] ListBox1-&gt;Items-&gt;Count; j++)
</code></pre>
<p>einzige Ausnahme ist AnsiString</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1197491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1197491</guid><dc:creator><![CDATA[Linnea]]></dc:creator><pubDate>Sun, 24 Dec 2006 21:14:48 GMT</pubDate></item><item><title><![CDATA[Reply to EStringListError - &#x27;List index out of bounds(1)&#x27; on Sun, 24 Dec 2006 21:24:37 GMT]]></title><description><![CDATA[<p>Okay, danke, mein Fehler</p>
<p>Gruß<br />
MWJK</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1197493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1197493</guid><dc:creator><![CDATA[MWJK]]></dc:creator><pubDate>Sun, 24 Dec 2006 21:24:37 GMT</pubDate></item></channel></rss>