why p->member ?

John Peters jsp at sp7040.UUCP
Mon Aug 8 03:10:36 AEST 1988


In article <16734 at adm.ARPA>, stanonik at nprdc.arpa (Ron Stanonik) writes:
> While explaining pointers to structures someone asked why
> the -> operator was needed; ie, why couldn't the members be
> referenced as p.member.

It needs to be referenced as a pointer.  To do that use:

		*p.member

it is the same as

		p->member

				--  Johnnie  --



More information about the Comp.unix.questions mailing list