This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
wstring class not defined - fix
- From: "Doron Wloschowsky" <doronw at cqsgroup dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Thu, 13 Feb 2003 14:57:26 +0200
- Subject: wstring class not defined - fix
Hi
I discovered that side strings are not defined in the string file. After checking the file I discovered that the wstring definition was commented out. I uncommented it and try to compile my code only to get a compile error form line 343 in bastring.h. The line reads:
const charT* c_str() const
{if ( length() == 0) return ""; terminate(); return data(); }
If this is modified to :
const charT* c_str() const
{if ( length() == 0) return (const charT*)L""; terminate(); return data(); }
The code compiles and runs and I do not expect that there will be any issues because "" point to a null character and L"" will just point to two null characters if charT is char.
I hope that this will be of interest to you. This simple fix will then allow the use of wide characters.
Regards
Doron Wloschowsky
Software Engineer
CQS Technology Holdings
Tel : +27 (011) 507-0000
Fax : +27 (011) 507-0001
Email : mailto:doronw@cqsgroup.com
Website : www.cqsgroup.com