pointer question

Barry Margolin barmar at mit-eddie.UUCP
Fri Apr 6 16:03:24 AEST 1984


--------------------
It is dangerous to increment pointer yourself (e.g. p = p + 4).
By doing so, you are restricting your programs to a specific machine type
since wordsize varies among diffenent machines. (a act against portability)

					Paul McFerrin
--------------------

I don't have my K&R handy, but I thought that adding an int to a pointer
was defined to scale the int appropriately.  There is nothing special
about auto-increment in this regard.
-- 
			Barry Margolin
			ARPA: barmar at MIT-Multics
			UUCP: ..!genrad!mit-eddie!barmar



More information about the Comp.lang.c mailing list