function should return a value? But i use return..
#2

because compiler doesn't know what should that function return if the false statement of last if is executed. In general a function can't be a void and returning one at same time.
Reply


Messages In This Thread
function should return a value? But i use return.. - by faxxe - 21.03.2017, 15:34
Re: function should return a value? But i use return.. - by SyS - 21.03.2017, 15:41
Re: function should return a value? But i use return.. - by faxxe - 21.03.2017, 15:57
Re: function should return a value? But i use return.. - by SyS - 21.03.2017, 17:00
Re: function should return a value? But i use return.. - by OneDay - 21.03.2017, 22:08

Forum Jump:


Users browsing this thread: 1 Guest(s)