To access a member of a pointer to a structure, use the ->
operator.
m->wallet = m->wallet - depositAmmount;
m->wallet = 0;
The .
operator has higher precedence than the *
dereference, so you need to use parentheses for that expression to obtain the structure member.
(*m).wallet = (*m).wallet - depositAmmount;
(*m).wallet = 0;