|
From: Dave W. <orb...@ne...> - 2002-12-12 01:37:52
|
right... i found the typedef in
$devcpp/include/g++-3/string :
// Main header for the -*- C++ -*- string classes.
#ifndef __STRING__
#define __STRING__
#include <std/bastring.h>
extern "C++" {
typedef basic_string <char> string;
// typedef basic_string <wchar_t> wstring;
} // extern "C++"
#endif
btw_____this matches exactly the file on my linux box (rh
7.1)_________/usr/include/g++-3/string :)
why is it commented out?
especially when there is an entry in the stdlib.ChangeLog stating that it
has been UNcommented ...
so i uncommented it, and i tried this :
#include <string>
#include <iostream.h>
void main (void) {
std::wstring fish;
fish = (wchar_t)"fish"; //i shouldn't have to typecast this should i
cout << fish << endl;
}
and the output is "0", which makes me think i'm missing something with how
wstrings are handled in the gnu std:: templates ...?
so this is why its commented out: because there are no operators /
translators yet for wchar_t types (of course constructing a translator is
daunting for me ...)
what do you think mike? anyone?
i think the fix to this problem would make it into the next gcc release?
> On Thu, 12 Dec 2002 11:55:27 +1100 Dave Walters
<orb...@ne...> wrote:
>
> > what is std::wstring? i know what std::string is but not wstring ...
> > none of
> > my books seem to know either ...?
>
> string is typedef for basic_string<char> i.e. 8 bit wide character string
> wstring is typedef for basic_string<wchar_t> i.e. 16 bit (unicode) wide
> character string
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> With Great Power, Comes Great Responsibility
> Learn to use your power at OSDN's High Performance Computing Channel
> http://hpc.devchannel.org/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|