Addressing struct without ->

Walter Bright bright at nazgul.UUCP
Thu Jan 17 04:44:31 AEST 1991


In article <91010.084408NIBMSCM at NDSUVM1.BITNET> NIBMSCM at NDSUVM1.BITNET writes:
/  In working with some of the more common 'C' packages, I've found
/one limiting factor that seems to come back and haunt me.  In working
/with some other languages, such as Pascal, I had the capability to use
/the 'using' keyword, giving the address of a structure and then address
/the elements of that structure without the necessity of using the
/ptr->element notation (could simply use element).
/  Could anyone out there tell me how I can implement this in 'C' or
/which language products have added such a function (currently using
/the bundled 'C' on SunOS).  Thanks in advance...

C++ currently has a similar feature, when if you are in a member function of
class X then you can access members of class X without specifying X->.



More information about the Comp.lang.c mailing list