<?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[Fehler!]]></title><description><![CDATA[<p>Moin Moin! ich hab da n problem und weiß nicht weiter:</p>
<pre><code class="language-cpp">AnsiString verb=Edit1-&gt;Text;
int x=verb.Length();
char endung=verb[x];

switch(endung)
  {
    AnsiString stamm=verb.SetLength(l-2);
      case 'a':break;
  }
</code></pre>
<p>Der sagt mir nur was von &quot;Case umgeht die Initalisierung einer lokalen Variable&quot;</p>
<p>Kann mir da jemand weiterhelfen?<br />
Vielen Dank im voraus!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/145966/fehler</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 08:43:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/145966.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 May 2006 19:45:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler! on Tue, 02 May 2006 19:45:35 GMT]]></title><description><![CDATA[<p>Moin Moin! ich hab da n problem und weiß nicht weiter:</p>
<pre><code class="language-cpp">AnsiString verb=Edit1-&gt;Text;
int x=verb.Length();
char endung=verb[x];

switch(endung)
  {
    AnsiString stamm=verb.SetLength(l-2);
      case 'a':break;
  }
</code></pre>
<p>Der sagt mir nur was von &quot;Case umgeht die Initalisierung einer lokalen Variable&quot;</p>
<p>Kann mir da jemand weiterhelfen?<br />
Vielen Dank im voraus!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1049915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1049915</guid><dc:creator><![CDATA[fischdeba]]></dc:creator><pubDate>Tue, 02 May 2006 19:45:35 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Tue, 02 May 2006 19:51:13 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">AnsiString stamm=verb.SetLength(l-2);
</code></pre>
<p>Muss das denn sein? nehm das dort mal raus! Dieses Teil ist nähmlich weder von einer Überprüfung, noch von irgendetwas anderem betroffen. Das kannst du genauso gut vor switch schreiben (ist auch zu empfehlen).</p>
<p>Mfg Ominion</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1049919</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1049919</guid><dc:creator><![CDATA[Ominion]]></dc:creator><pubDate>Tue, 02 May 2006 19:51:13 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Tue, 02 May 2006 20:55:30 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>und die Fehlermeldung kommt, weil du den switch-Block völlig durcheinander bringst</p>
<pre><code class="language-cpp">switch(endung)
  case 'a':
  {
    AnsiString stamm=verb.SetLength(l-2);
    break;
  }
</code></pre>
<p>oder</p>
<pre><code class="language-cpp">AnsiString stamm;
switch(endung)
  case 'a':
  {
    stamm=verb.SetLength(l-2);
    break;
  }
</code></pre>
<p>Und natürlich den anderen Hinweis beachten, das der Code irgendwie sinnfrei ist</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1049955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1049955</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 02 May 2006 20:55:30 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Tue, 02 May 2006 21:08:40 GMT]]></title><description><![CDATA[<p>muss es nicht...</p>
<pre><code class="language-cpp">switch(endung){
  case 'a':
    AnsiString stamm=verb.SetLength(l-2);
    break;
 }
</code></pre>
<p>heissen?</p>
<p>gruessle</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1049959</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1049959</guid><dc:creator><![CDATA[TDO]]></dc:creator><pubDate>Tue, 02 May 2006 21:08:40 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Wed, 03 May 2006 06:15:29 GMT]]></title><description><![CDATA[<p>Besser nicht, denn spätestens bei einem case 'b' würde die selbe Fehlermeldung kommen (auch wenn dieser Block die Variable stamm nicht benötigt) - durch die zusätzliche Klammerung bleibt die Variable stamm auf den case'a'-Block beschränkt.</p>
<p>PS@fischdeba: Wenn sich die Klasse AnsiString halbwegs an die üblichen Konventionen für Array hält, ist der Ausdruck verb[verb.Length()] entweder der Null-Terminator oder undefiniert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050013</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 03 May 2006 06:15:29 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Wed, 03 May 2006 06:58:27 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>@ CStoll : nein AnsiString hält sich nicht an die Konvention... das erste Element hat (wie in Delphi üblich) den Index 1</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050033</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 03 May 2006 06:58:27 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Wed, 03 May 2006 07:56:09 GMT]]></title><description><![CDATA[<p>Ist AnsiString nicht ein BCB Datentyp? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050057</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050057</guid><dc:creator><![CDATA[Chris++ 0]]></dc:creator><pubDate>Wed, 03 May 2006 07:56:09 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Wed, 03 May 2006 08:00:58 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ja AnsiString ist in der VCL des Builders enthalten. Aber die VCL ist eine Umsetzung aus der Delphi-VCL, und so wurden einige Konventionen vondort übernommen, die in Standard-C++ anders sind.</p>
<p>Dazu nochmal der passende text aus der BCB-Doku :</p>
<blockquote>
<p>AnsiString::operator []<br />
...<br />
Beschreibung</p>
<p>Es wird das Zeichen an der im Indexwert idx angegebenen Position im String zurückgegeben. Die Indexnumerierung beginnt mit 1. Bei dem String &quot;Hallo&quot; und einem Indexwert von 2 würde beispielsweise das Zeichen 'a' zurückgegeben.</p>
</blockquote>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050059</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 03 May 2006 08:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Wed, 03 May 2006 08:23:42 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=10455" rel="nofollow">evilissimo</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">VCL/CLX (Borland C++ Builder)</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050072</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050072</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 03 May 2006 08:23:42 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler! on Wed, 03 May 2006 19:26:28 GMT]]></title><description><![CDATA[<p>Also Jungs, erstmal vielen Dank für die reichlichen Hinweise!<br />
Den Fehler hatte ich gestern auch schon gefunen:</p>
<pre><code class="language-cpp">AnsiString verb;

switch(...)
.
.
.
</code></pre>
<p>AnsiString musste vor die Switch-Anweisung... Wie gesagt, nochmal DANKE!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050536</guid><dc:creator><![CDATA[fischdeba]]></dc:creator><pubDate>Wed, 03 May 2006 19:26:28 GMT</pubDate></item></channel></rss>