<?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[CString in einer Konsolenanwendung]]></title><description><![CDATA[<p>Hi, ich wollt den MFC-CString in einer Konsolenanwendung hernehmen nur wirft er beim linken dann folgende Fehler:#<br />
Linker-Vorgang läuft...<br />
nafxcwd.lib(thrdcore.obj) : error LNK2001: Nichtaufgeloestes externes Symbol __endthreadex<br />
nafxcwd.lib(thrdcore.obj) : error LNK2001: Nichtaufgeloestes externes Symbol __beginthreadex<br />
Debug/dlgparser.exe : fatal error LNK1120: 2 unaufgeloeste externe Verweise<br />
Fehler beim Ausführen von link.exe.</p>
<p>dlgparser.exe - 3 Fehler, 0 Warnung(en)</p>
<p>ok es ist bestimmt irgendeine Linkeroption ...... nur welche!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/48773/cstring-in-einer-konsolenanwendung</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 02:53:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/48773.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Sep 2003 09:13:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Fri, 12 Sep 2003 09:13:28 GMT]]></title><description><![CDATA[<p>Hi, ich wollt den MFC-CString in einer Konsolenanwendung hernehmen nur wirft er beim linken dann folgende Fehler:#<br />
Linker-Vorgang läuft...<br />
nafxcwd.lib(thrdcore.obj) : error LNK2001: Nichtaufgeloestes externes Symbol __endthreadex<br />
nafxcwd.lib(thrdcore.obj) : error LNK2001: Nichtaufgeloestes externes Symbol __beginthreadex<br />
Debug/dlgparser.exe : fatal error LNK1120: 2 unaufgeloeste externe Verweise<br />
Fehler beim Ausführen von link.exe.</p>
<p>dlgparser.exe - 3 Fehler, 0 Warnung(en)</p>
<p>ok es ist bestimmt irgendeine Linkeroption ...... nur welche!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352073</guid><dc:creator><![CDATA[Jason_Frost]]></dc:creator><pubDate>Fri, 12 Sep 2003 09:13:28 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sat, 13 Sep 2003 00:25:03 GMT]]></title><description><![CDATA[<p>haste in den projektoptionen, MFC Bibilothek statisch/dynamisch benutzen, verwendet?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352664</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352664</guid><dc:creator><![CDATA[Dezipaitor]]></dc:creator><pubDate>Sat, 13 Sep 2003 00:25:03 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sat, 13 Sep 2003 08:22:59 GMT]]></title><description><![CDATA[<p>Hi!<br />
Probier mal #include &lt;afx.h&gt;</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352701</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352701</guid><dc:creator><![CDATA[mike84]]></dc:creator><pubDate>Sat, 13 Sep 2003 08:22:59 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sat, 13 Sep 2003 09:07:34 GMT]]></title><description><![CDATA[<p>warum nimmst du nicht std::string ?</p>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352709</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Sat, 13 Sep 2003 09:07:34 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sat, 13 Sep 2003 18:18:50 GMT]]></title><description><![CDATA[<p>CString (MFC) und z.B. auch wxString (wxWindows) stammen aus Zeiten, in denen nicht jeder Compiler std::string unterstützte. Inzwischen ist dies aber obsolet. Daher sollte man auf std::string umstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/353017</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/353017</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Sat, 13 Sep 2003 18:18:50 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sat, 13 Sep 2003 20:59:18 GMT]]></title><description><![CDATA[<p>std::string ist auch nicht so dass wahre,</p>
<p>ich nutze auch viel lieber eine erweiterung von cstring (ohne MFC),<br />
irgendwie komme ich damit besser zuerecht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/353081</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/353081</guid><dc:creator><![CDATA[Dezipaitor]]></dc:creator><pubDate>Sat, 13 Sep 2003 20:59:18 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sun, 14 Sep 2003 05:53:26 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/3691">@Dezipaitor</a>: Kannst Du das genauer erläutern? Wo ist das Problem bei std::string, und was ist &quot;cstring&quot; genau?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/353158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/353158</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Sun, 14 Sep 2003 05:53:26 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sun, 14 Sep 2003 16:00:52 GMT]]></title><description><![CDATA[<p>naja ich will keinen von std::string abbringen,<br />
letztendlich kann jeder das verwenden, was ihm besser liegt.</p>
<p>ich verwende lieber<br />
entweder eine kopie der klasse cstring für nonmfc<br />
<a href="http://www.sourceforge.net/projects/vtools" rel="nofollow">http://www.sourceforge.net/projects/vtools</a><br />
oder<br />
eine überladung von operatoren (+,+=...).</p>
<p>um<br />
z.b. dies zu ermöglichen string1 + string2<br />
usw</p>
<p>aber ich werde wohl mal nach einer erweiterung von basic_string suchen,<br />
um auch zahlenkonvertierungen über streams durchführen zu lassen (wie in vstring)<br />
man muss noch zuoft API funktionen verwenden und mit c_str konvertieren um zu suchen, ersetzen , zu konvertieren usw.</p>
<pre><code class="language-cpp">class VString :VThreadSafeClass 
{
public:

	bool CmpCaseSensitive;

	VString();
	VString(const char String,bool nCmpCaseSensitive = FALSE) ;
	VString(const VString &amp;String,bool nCmpCaseSensitive = FALSE) ;
	VString(const STRING String,bool nCmpCaseSensitive = FALSE);
	VString(const STRING String, int LenOrPort, bool IsIP =FALSE,bool nCmpCaseSensitive = FALSE); 
	VString(const STRING IPAddress,const STRING Port);

	virtual ~VString();

	void Init();

	//Empties and initiates a new string with a length of &lt;size&gt;. result is the new allocated size
	int PreAlloc(int Size);

	bool IsValidIndex(int nIndex)  const;
	void MakeReverse( );
	VString MakeReverseV();

	void MakeLower();
	VString MakeLowerV();

	void MakeUpper();
	/*Erzeugt aus dem String der Klasse eine Kopie und gibt das Ergebnis von MakeUpper zurück.
	Die Daten des String werden dabei nicht verändert.*/
	VString MakeUpperV();

	int Replace(const STRING lpszOld,const STRING lpszNew );

	int Remove(const  CHAR ch );

	/*Fügt einen String an der Stelle nIndex ein.
	Soll ein String vor dem ersten Zeichen eingefügt werden, muss nIndex  0 sein*/
	int Insert( int nIndex, const STRING pstr, int Length = 0 );
	int Append(const STRING pstr, int Length = 0 );

	int Delete( int nIndex, int nCount = 1 );

	void Format(const STRING lpszFormat, ... );
	void FormatV(const STRING lpszFormat, va_list argList );

	/*Zeichen links und rechts löschen
	Ist ch nicht angegeben, wird nach \t \n \r ' ' gesucht
	*/
	void TrimLeft(CHAR ch = NULL);
	void TrimRight(CHAR ch = NULL);
	void TrimWhiteSpaces();
	void TrimCReturns();

	/*not implemented*/
	void FormatMessage(const  STRING lpszFormat, ... );

	/*sucht nach einem SubString pstr (Unterscheidung v. Groß-Kleinschreibung mit CmpCaseSensitive)
	ab nStart und gibt das erste Zeichen des gefundenen Substrings zurück.
	nStart und der Rückgabewert basiert auf dem ersten Zeichen, das den Index 1 besitzt.
	Wenn nichts gefunden wird, wird 0 zurückgegeben, Bei Fehlerfall -1
	*/
	int Find(const STRING pstr, int nStart = 1) const;
	int Find(const char pstr, int nStart = 1) const
	int ReverseFind(const CHAR ch ) const;

	//
	VString Mid( int nFirst,  int nCount ) const;
	VString Left( int nCount ) const;
	VString Right( int nCount ) const;

	bool IsEmpty() const;
	void Empty();

	//Zeichenoperationen
	bool SetAt(int nIndex, CHAR ch) ;
	CHAR GetAt(int Index) const;

	//Vergleichsmethoden
	int Compare(const STRING lpsz ) const;
	int CompareCase(const STRING lpsz) const;
	int CompareNoCase(const STRING lpsz ) const;

	VString SpanExcluding(const STRING lpszCharSet) const;
	VString SpanIncluding(const STRING lpszCharSet) const;

	int FindOneOf(STRING lpszCharSet ) ;
	int GetLength( ) const;

	//String als (ganzzahlige) Nummer - Methoden

	long Str2IntDefL(int Def);
	int Str2IntDef(int Def);

    long Str2IntL() ;
	int Str2Int();

	VString Int2Str(long Value);
	VString Int2Str(int Value);
	bool IsNumberInt();

	//String als IP-Addresse mit Port
	int GetPort();
	bool IsValidIP();
	VString GetIP();

	/*VString p(&quot;4E5&quot;);
	ULONG d = (ULONG)(p.StringToType &lt;double&gt; ());*/
	template &lt;class T&gt; T StringToType ();

	//Routinen zum direkten Puffereingriff
	int GetBuffer(STRING &amp;Buffer);
	//inline STRING GetBuffer(size_t Length = -1) 

	STRING GetBuffer();
	int SetBuffer(const STRING p, int len);

	//Zugriff auf einzelne Zeichen
	CHAR operator [](int nIndex) const;

	int FillChar(VCHAR FillChar, size_t Length = 0);

	//additional functions out of basic_string

	inline STRING c_str();

	operator STRING() const;

	size_t capacity( ) const;

	inline void swap(VString &amp;_Str);

	inline void swap(STRING &amp;_Str,size_t Length = 0);
	inline void swap(char &amp;_Str);

	//Veränderungsoperatoren
	VString operator +( const VString&amp; string);
	VString operator +( const CHAR ch);

	const VString&amp; operator +=( const VString&amp; string );
	const VString&amp; operator +=( const CHAR ch );

	VString&amp; operator =( const VString&amp; String );
	//VString&amp; operator =(void *String) { (*this) };

	/*Vergleichsoperatoren.
	Unterscheidung zwischen Groß- und Kleinschreibung durch 
	Setzen von CmpCaseSensitive.
	*/

	BOOL operator ==( const STRING s);

	BOOL operator !=(const STRING s);

	BOOL operator &lt;(const STRING s);

	BOOL operator &gt;(const STRING s);

	BOOL operator &lt;=(const STRING s);

	BOOL operator &gt;=(const STRING s);
};

//Hilfsfunktionen
extern _EXPORT_DLL_ long _Str2IntDefL(const STRING,int Def);
extern _EXPORT_DLL_ int _Str2IntDef(const STRING,int Def);
extern _EXPORT_DLL_ STRING _Int2Str(long Value);
extern _EXPORT_DLL_ STRING _Int2Str(int Value);

extern _EXPORT_DLL_ int _MakeUpper(STRING &amp;text);
extern _EXPORT_DLL_ int _MakeUpper(char &amp;ch);

extern _EXPORT_DLL_ int _MakeLower(STRING &amp;text);
extern _EXPORT_DLL_ int _MakeLower(char &amp;ch);

extern _EXPORT_DLL_ int _CmpText(const STRING str1,const STRING str2);
extern _EXPORT_DLL_ STRING _FormatStr(const STRING lpFormatString,...);

extern _EXPORT_DLL_ long Str2IntDefL(const VString Num,int Def);
extern _EXPORT_DLL_ int Str2IntDef(const VString Num,int Def);
extern _EXPORT_DLL_ VString Int2Str(long Value);
extern _EXPORT_DLL_ VString Int2Str(int Value);

static vtools::VString operator +(const VString s1, const VString s2)
static vtools::VString operator +(const char s1, const VString s2)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/353409</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/353409</guid><dc:creator><![CDATA[Dezipaitor]]></dc:creator><pubDate>Sun, 14 Sep 2003 16:00:52 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sun, 14 Sep 2003 17:55:09 GMT]]></title><description><![CDATA[<p>Du hast wahrscheinlich die &quot;Single Threaded&quot; - C++ Laufzeit - Bibliotheken angegeben, MFC besteht aber auf Multithreaded.</p>
<p>Die WTL enthält einen (nunmehr ofiziellen) CString-Klon für die ATL, bei dem meines Wissens nur die .Load-methode angepaßt werden muß.</p>
<p>ph</p>
]]></description><link>https://www.c-plusplus.net/forum/post/353473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/353473</guid><dc:creator><![CDATA[peterchen]]></dc:creator><pubDate>Sun, 14 Sep 2003 17:55:09 GMT</pubDate></item><item><title><![CDATA[Reply to CString in einer Konsolenanwendung on Sun, 14 Sep 2003 18:18:06 GMT]]></title><description><![CDATA[<p>Also ich muss gestehen, dass ich sowohl std::string als auch CString verwende. std::string benutze ich wenn es plattformabhängig sein soll. Wenn fest steht, dass die Applikation sowieso nur auf Windows laufen soll nehme ich öfters den einfacheren und umfangreicheren CString. Mir fehlen bei std::string einfach die üblichen Funktionen wie Replace und Trim. Ich habe früher mal eine Klasse stringex geschrieben die alle diese Funktionen für std::string hatte (finde sie aber nicht mehr).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/353494</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/353494</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Sun, 14 Sep 2003 18:18:06 GMT</pubDate></item></channel></rss>