Recursive function does not return specified value

前端 未结 2 1281
栀梦
栀梦 2020-11-22 04:14

I am trying to debug a recursive function used to validate user input and return a value when the input is OK. The function looks like this:

double load_pric         


        
2条回答
  •  猫巷女王i
    2020-11-22 04:47

    You're not using the return value of the recursive call. You need to do:

    return load_price();
    

提交回复
热议问题