It's hard to be sure without more context, but given the expression
*(flow + i*n + j) += minFlowPath;
it's likely that flow
is a pointer. The subexpression flow + i*n + j
constitutes pointer arithmetic. Addition of a pointer and an integer yields a new pointer pointing to an element counted beyond the original pointer, so here we're pointing to the element which is i*n + j
elements beyond wherever flow
points. (As Barmar points out in a comment, this suggests that flow
is being treated as a flattened 2D array, accessing the i,j
th element.)
Given any pointer or pointer-valued expression, the unary *
operator access the value that the pointer points to. So
*(flow + i*n + j)
is the value which is i*n + j
past whatever flow
points to.
When you access a pointer using *
in this way, you get something called an lvalue, a technical term meaning that you can do more than just fetch the pointed-to value, you can also modify the pointed-to value. And that's exactly what we do here. C's +=
operator adds to a value, in-place. So whatever the pointed-to value was, we add the value minFlowPath
to it.
To learn more about this, read up on pointer arithmetic, pointer indirection, and assignment operators.