Giorgos Keramidas <[EMAIL PROTECTED]> wrote:
: This is marvellous in it's simplicity of interface.
: 
: Yet, using sizeof(char) and assuming that it's going to be 1, strikes me
: like a dangerous thing to do.  I have never heard of machines where this
: isn't true, but I seem to recall that the comp.lang.c FAQ mentions this
: somewhere.  I'll look it up tomorrow, since it's getting too late...

In both C and C++, sizeof(T) is defined to be the size of T in terms of the
size of a char, so by definition sizeof(char) == 1.

You can look it up (for C) at:

    http://www.eskimo.com/~scs/C-faq/q7.8.html

For C++, see section 4.6 of The C++ Programming Language.

                -Ed




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to