while loop

Hey, I'm not brand new to C++ but I was wondering about this code:

int f = 0;
int j = 0;

while((acinput[f] = acinput[j++]) != '\0')
if(acinput[f] != ' ')
f++;

This while loop works, and deletes the spaces from an array.
I am however wondering why it works. I've been working with C++ as my first programming language (not a very good starting language .. but whatever) and I have not seen a statement such as 'x = y' inside the while condition. How does this work?
x=y evaluates to x for built-in types (edit: the value of x after the assignment, that is).
Last edited on
It evaluates the value of x after the assignment ( which is the value of y )
Topic archived. No new replies allowed.