[Solved] Getting warning: control may reach end of non-void function when trying to compile

[ad_1]

You are getting the warning because you have left open scenarios where a return statement may not be reached. Currently you only have one, in your else statement scope. What will you return outside of the scope of the else statement?

[ad_2]

solved Getting warning: control may reach end of non-void function when trying to compile