This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 'unsigned char *' does not seem to be a 'const _CharT *' in the 'std::basic_ostream::write' template
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: gcc-bugs at gcc dot gnu dot org, santiago at haulpak dot com
- Date: Fri, 25 Jan 2002 22:05:34 -0800
- Subject: Re: 'unsigned char *' does not seem to be a 'const _CharT *' in the 'std::basic_ostream::write' template
....because _CharT refers to ofstream::char_type, ie char, not unsigned char.
You need to use the formatted inserters, which are specialized for
unsigned char.
best,
benjamin