Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

HAY GUYS WUT DO U THINK OF THIS

Name: Anonymous 2006-06-28 18:47


"On Wednesday, June 28, 2006 you asked the following question;

this loop:

while(*(string1++)=*(string2++));

when does it ends?

The following answer has just been sent to you;

It doesn't if this is in C++. You assigned string2 to string1. == is for comparisons. fuckin' n00b."

i lold

Name: Anonymous 2006-07-27 0:47

>>25

You're saying that

*(p++)

is functionally equivalent to

*p++

?

I guess I need to review the precedence rules re: the postincrement and dereferencing operator, then, because that doesn't seem right to me.  I would expect the parentheses to force the postincrement to evaluate before we evaluate anything surrounding the parentheses, including the *.

Problem is that you have to read that right-to-left (counter to the rest of the program). Something like 0→a→b→c might make more sense.

Who says that's a problem?  Standard mathematical assignment notation has always been intuitively right-associative to me.  This is a personal preference thing, not an objective fault in the approach.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List