<?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[Fehlermeldung bei Compilierung]]></title><description><![CDATA[<p>Hallo,<br />
erhalte folgenden Fehler bei Compilierung des folgenden Quelltextes:</p>
<p>[C++ Fehler] Sprachauswahl.cpp(14): E2451 Undefiniertes Symbol 'String'<br />
[C++ Fehler] Sprachauswahl.cpp(71): E2268 Aufruf der undefinierten Funktion 'searchLang'</p>
<pre><code class="language-cpp">void split(String&amp; text, String&amp; separators, vector&lt;String&gt;&amp; words)
{
	int n = text.length();
	int start, stop;

	start = text.find_first_not_of(separators);
	while ((start &gt;= 0) &amp;&amp; (start &lt; n))
	{
		stop = text.find_first_of(separators, start);
		if ((stop &lt; 0) || (stop &gt; n)) stop = n;
		words.push_back(text.substr(start, stop - start));
		start = text.find_first_not_of(separators, stop+1);
	}
}
//-----------------------------------------------------------------------------
void searchLang(String *returnXMLNode,String *returnLangNode)
{
	try
  		{
        	_di_IXMLDocument XML = LoadXMLDocument(&quot;language.xml&quot;);
        	_di_IXMLNodeList NodeList = XML-&gt;DocumentElement-&gt;ChildNodes;
           	_di_IXMLNode TestNode = NodeList-&gt;Nodes[0];
    		int count = TestNode-&gt;ChildNodes-&gt;Count;

    		for (int j=0; j&lt;count; j++)
        	{
            	returnXMLNode[j]= (String)TestNode-&gt;ChildNodes-&gt;Nodes[j]-&gt;NodeName;
            	returnLangNode[j]= (String)TestNode-&gt;ChildNodes-&gt;Nodes[j]-&gt;NodeValue;
        	}

        }

    catch (...)
		{
        try
				{
                        throw Exception(&quot;Language-file not found!&quot;);
                }

            catch (Exception &amp;exception)
				{
					Application-&gt;ShowException(&amp;exception);
				}
		}
}

TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
	: TForm(Owner)
{
	CB_Lang-&gt;Clear();
	int LangValueLength;
    String LangShortValue[40];
    String LangLongValue[40];
	searchLang(LangShortValue, LangLongValue);
 	LangValueLength = LangLongValue-&gt;Length();

    for (int i = 0; i &lt; LangValueLength ; i++ )
    {
    	CB_Lang-&gt;Items-&gt;Add(LangShortValue[i]+ &quot; &quot; + LangLongValue[i]);
    }
}
//---------------------------------------------------------------------------

void __fastcall TForm2::CB_LangSelect(TObject *Sender)
{
	String Language;
    Language = CB_Lang-&gt;Text;
// Hier folgt aufruf der Methode Split mit übergabe von dem String Language und Seperator
}
</code></pre>
<p>Kann mir da jemand weiterhelfen? Habe bestimmt in der Eile etwas übersehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/162275/fehlermeldung-bei-compilierung</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 17:29:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/162275.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Oct 2006 07:48:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 07:48:01 GMT]]></title><description><![CDATA[<p>Hallo,<br />
erhalte folgenden Fehler bei Compilierung des folgenden Quelltextes:</p>
<p>[C++ Fehler] Sprachauswahl.cpp(14): E2451 Undefiniertes Symbol 'String'<br />
[C++ Fehler] Sprachauswahl.cpp(71): E2268 Aufruf der undefinierten Funktion 'searchLang'</p>
<pre><code class="language-cpp">void split(String&amp; text, String&amp; separators, vector&lt;String&gt;&amp; words)
{
	int n = text.length();
	int start, stop;

	start = text.find_first_not_of(separators);
	while ((start &gt;= 0) &amp;&amp; (start &lt; n))
	{
		stop = text.find_first_of(separators, start);
		if ((stop &lt; 0) || (stop &gt; n)) stop = n;
		words.push_back(text.substr(start, stop - start));
		start = text.find_first_not_of(separators, stop+1);
	}
}
//-----------------------------------------------------------------------------
void searchLang(String *returnXMLNode,String *returnLangNode)
{
	try
  		{
        	_di_IXMLDocument XML = LoadXMLDocument(&quot;language.xml&quot;);
        	_di_IXMLNodeList NodeList = XML-&gt;DocumentElement-&gt;ChildNodes;
           	_di_IXMLNode TestNode = NodeList-&gt;Nodes[0];
    		int count = TestNode-&gt;ChildNodes-&gt;Count;

    		for (int j=0; j&lt;count; j++)
        	{
            	returnXMLNode[j]= (String)TestNode-&gt;ChildNodes-&gt;Nodes[j]-&gt;NodeName;
            	returnLangNode[j]= (String)TestNode-&gt;ChildNodes-&gt;Nodes[j]-&gt;NodeValue;
        	}

        }

    catch (...)
		{
        try
				{
                        throw Exception(&quot;Language-file not found!&quot;);
                }

            catch (Exception &amp;exception)
				{
					Application-&gt;ShowException(&amp;exception);
				}
		}
}

TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
	: TForm(Owner)
{
	CB_Lang-&gt;Clear();
	int LangValueLength;
    String LangShortValue[40];
    String LangLongValue[40];
	searchLang(LangShortValue, LangLongValue);
 	LangValueLength = LangLongValue-&gt;Length();

    for (int i = 0; i &lt; LangValueLength ; i++ )
    {
    	CB_Lang-&gt;Items-&gt;Add(LangShortValue[i]+ &quot; &quot; + LangLongValue[i]);
    }
}
//---------------------------------------------------------------------------

void __fastcall TForm2::CB_LangSelect(TObject *Sender)
{
	String Language;
    Language = CB_Lang-&gt;Text;
// Hier folgt aufruf der Methode Split mit übergabe von dem String Language und Seperator
}
</code></pre>
<p>Kann mir da jemand weiterhelfen? Habe bestimmt in der Eile etwas übersehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156044</guid><dc:creator><![CDATA[Hausmarke]]></dc:creator><pubDate>Tue, 17 Oct 2006 07:48:01 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 07:54:51 GMT]]></title><description><![CDATA[<p>Die Fehlermeldung bezieht sich auf Zeile 1 des Quelltextes!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156053</guid><dc:creator><![CDATA[Hausmarke]]></dc:creator><pubDate>Tue, 17 Oct 2006 07:54:51 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 07:55:34 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ja hast du, und zwar anzugeben<br />
- an wlechen Stellen genau die Meldung angezeigt werden.<br />
- Die Aufteilung des Codes auf die Dateien</p>
<p>Deshalb kann ich nur raten</p>
<blockquote>
<p>Undefiniertes Symbol 'String'</p>
</blockquote>
<p>bedeutet das du wohl bei der Datei mit der Deklaration der split-Funktion den Include <em>#include &lt;VCL.h&gt;</em> vergessen</p>
<blockquote>
<p>Aufruf der undefinierten Funktion 'searchLang'</p>
</blockquote>
<p>Du hast in der Form-Datei den Include auf die Datei mit der Deklaration mit der split-Funktion vergessen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156055</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156055</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 17 Oct 2006 07:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 08:00:23 GMT]]></title><description><![CDATA[<p>Habe den Fehler schon gefunden. War etwas Anderes.<br />
Trotzdem danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156059</guid><dc:creator><![CDATA[Hausmarke]]></dc:creator><pubDate>Tue, 17 Oct 2006 08:00:23 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 08:04:57 GMT]]></title><description><![CDATA[<p>Da 'find_first_not_of' ist kein Element von 'AnsiString' ist, suche ich nun eine möglichkeit meine AnsiStringvariable so zu konvertieren, dass ich mit 'find_first_not_of' arbeiten kann. Wie geht das am besten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156061</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156061</guid><dc:creator><![CDATA[Hausmarke]]></dc:creator><pubDate>Tue, 17 Oct 2006 08:04:57 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 08:11:02 GMT]]></title><description><![CDATA[<p>Hausmarke schrieb:</p>
<blockquote>
<p>Da 'find_first_not_of' ist kein Element von 'AnsiString' ist, suche ich nun eine möglichkeit meine AnsiStringvariable so zu konvertieren, dass ich mit 'find_first_not_of' arbeiten kann. Wie geht das am besten?</p>
</blockquote>
<p>AnsiString to std::string --&gt; Google, FAQ, Borland Hilfe...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156063</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156063</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Tue, 17 Oct 2006 08:11:02 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 08:12:35 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>find_first_not_of ist eine Methode von <a href="http://www.cppreference.com/cppstring/find_first_not_of.html" rel="nofollow">std::string</a>, nicht von AnsiString.<br />
Da du das nicht weißt nehm ich an du hast die Funktion split irgendwo herauskopiert und den String-Typ durch AnsiString ersetzt. Das geht so nicht, du must zumindestens intern mit std::string arbeiten.</p>
<pre><code class="language-cpp">#include &lt;string&gt;
...
void split(const String&amp; text, const String&amp; separators, vector&lt;String&gt;&amp; words)
{
    std::string buffer = text.c_str(); // Umwandlugn auf den richtigen Datentyp
    int n = buffer.length();
    int start, stop;

    start = buffer.find_first_not_of(separators.c_str());
    while ((start &gt;= 0) &amp;&amp; (start &lt; n))
    {
        stop = buffer.find_first_of(separators.c_str(), start);
        if ((stop &lt; 0) || (stop &gt; n)) stop = n;
        words.push_back(AnsiString(buffer.substr(start, stop - start).c_str()));
        start = buffer.find_first_not_of(separators.c_str(), stop+1);
    }
}
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156064</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156064</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 17 Oct 2006 08:12:35 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 08:21:06 GMT]]></title><description><![CDATA[<p>Sorry,<br />
aber danke.<br />
Habe mir das als Vorlage genommen gehabt. Habe nicht soviel mit den Methoden von st::string gearbeitet. Danke dir.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156074</guid><dc:creator><![CDATA[Hausmarke]]></dc:creator><pubDate>Tue, 17 Oct 2006 08:21:06 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 09:12:04 GMT]]></title><description><![CDATA[<p>Warum machst du die Parameter der Funktion nicht auch gleich zu std::string? Dann brauchst du nicht mehr zu konvertieren (in der Funktion).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156108</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156108</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 17 Oct 2006 09:12:04 GMT</pubDate></item><item><title><![CDATA[Reply to Fehlermeldung bei Compilierung on Tue, 17 Oct 2006 09:31:30 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ich vermute das damit auch die Texte von VCL-Controls (und damit AnsiStrings) übersetzt werden soll, und dann wäre eine interne Konvertierung sinnvoller.<br />
Wenn dem nicht so sein sollte, ist natürlich eine native Unrterstützung von std::string als Paramter besser. Sprich die Funktion im Originalzustand belassen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1156128</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1156128</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 17 Oct 2006 09:31:30 GMT</pubDate></item></channel></rss>