This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Signedness of char and puts()
- From: Michael Eager <eager at eagercon dot com>
- To: Eljay Love-Jensen <eljay at adobe dot com>
- Cc: Ed Stafford <ed dot stafford at xilinx dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 31 Mar 2008 02:14:32 -0700
- Subject: Re: Signedness of char and puts()
- References: <C412BB9F.3211%eljay@adobe.com>
Eljay Love-Jensen wrote:
Hi Ed,
Does anyone know why this occurs?
Those are three different types.
+ char
+ unsigned char
+ signed char
"Hello" is a char*, not an unsigned char* or signed char*.
In C, char is signed or unsigned, depending on the implementation.
In C++, it is a distinct type.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077