Please enclose your code between code tags next time.
Hindi mo ipinost yung function call, so I call only infer from here. Looking at the function definition, ang gusto mo mangyari (i think) is for your function to test if the char function argument is either of of '*', '/', '+', or '-'. Then return their corresponding weight value. And you initialized weight=-1.
The reason you are getting the default weight value -1 is because your function argument is neither (o hindi isa man) sa selection mo. Hence, the switch-block is skipped and went straight into return.
If you want to force the user to input only the accepted choices, then you must do input validation prior to entering switch-block.