C++ contains a syntactical shorthand for simultaneously declaring a variable and branching on its value.
if (MouseEvent *mouse = dynamic_cast<MouseEvent *>(event))
I think it is a complicated description and a complicated example for saying that the assignment operator (=) returns the value that was assigned.