[Solved] C error: control reaches end of non void function
[ad_1] This is because your function has a possible code path that lets the if’s fall through without the function returning anything. Technically it shouldn’t be possible, but the compiler has noticed the possibility, and won’t let you continue. Your function should look more like this: Degree climate_control(Degree degree) { if (degree == LOW_TEMPERATURE_BOUNDARY) { … Read more