Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2000 18:56:08 -0800
From:      Ed Hall <edhall@screech.weirdnoise.com>
To:        current@FreeBSD.ORG
Subject:   Re: MAX_UID ? 
Message-ID:  <200003140256.SAA07308@screech.weirdnoise.com>
In-Reply-To: Your message of "Tue, 14 Mar 2000 03:54:21 %2B0200." <20000314035420.B17084@hades.hell.gr> 

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas <keramida@ceid.upatras.gr> 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003140256.SAA07308>