On Tue, Mar 01, 2005 at 11:44:22PM +0800, Andrew Calkin wrote:
I thought a pointer was a pointer, but C allowed pointer arithmetic.
That was why when you declare a pointer variable, you need the type
defined for which the pointer will be used, right? So then the
pointer arithmetic knows how many bytes are used in e.g. an element
of an array of characters as opposed to an array of integers or an
array of floating-point numbers, for example.

Or am I wrong here?

You are correct :-) I guess I was thinking something else when I wrote that.

--
Hui Zhou
--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to