Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!dimacs.rutgers.edu!rutgers!modus!simm!yachaya!oliver!newsuser From: newsuser@oliver.SUBLINK.ORG (Ugo Cei) Newsgroups: comp.lang.c Subject: Re: missing ->= operator Message-ID: <982@oliver.SUBLINK.ORG> Date: 2 May 91 21:56:29 GMT References: <9104291641.AA00534@dutiaa.tudelft.nl> Organization: Oliver, Pavia, Italy Lines: 29 schuller@DUTIAA.TUDELFT.NL (Schuller Schuller Oijen) writes: >What you do quite often is : mygodptr = mygodptr->next; >Now C has all these wonderful operators : a += 7, g &= 0xf, etc, etc. >But the ->= operator is missing! You cannot do mygodptr ->= next; ! Of course you can't: next is not an rvalue, so it cannot be on the rhs of an assignment. Moreover, just wonder what would happen if you had this piece of code: struct foo { struct foo * next; } * bar; int next; ... bar ->= next; Maybe you can just switch to C++ and overload the ++ operator do do such things. Cheers -- **************** | Ugo Cei | home: newsuser@oliver.sublink.org * OLIVER * | Via Colombo 7 | office: cei@ipvvis.unipv.it **************** | 27100 Pavia ITALY | "Real Programs Dump Core"