Re: read does not work with basic_ifstream< unsigned char >

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luciano,

You haven't plumbed up the facet, the locale, and/or the codecvt facilities
for your new stream's base type.

Some C++ compilers give you those things for char, and plumb char up to
locale facilities provided by the OS (e.g., the LC_ALL environment
variable).

Most C++ compilers give you those things for char and wchar_t, and, again,
plumb char and wchar_t up to locale facilities provided by the OS.

I don't know of any C++ compilers that provide you those things for unsigned
char, nor do I know of any OS that provides those facilities for unsigned
char.

Take a look at "Standard C++ IOStreams and Locales" by Angelika Langer and
Klaus Kreft, for all the gory details.

You'll be whipping up your own custom std::basic_ifstream<float> and
std::basic_ifstream<MyBigStruct> in no time.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux