missing ->= operator
Ugo Cei
newsuser at oliver.SUBLINK.ORG
Fri May 3 07:56:29 AEST 1991
schuller at 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 at oliver.sublink.org
* OLIVER * | Via Colombo 7 | office: cei at ipvvis.unipv.it
**************** | 27100 Pavia ITALY | "Real Programs Dump Core"
More information about the Comp.lang.c
mailing list