Return problem ? I think
#3

Basically, never return inside a loop body unless you want to explicitly exit the loop.

Also, the variable "j" is often used when the number of iterations (the number of times the loop is supposed to run) is determined by a function, so as to not invoke the function again with each iteration. You have a constant here so you have no need for the variable "j". You should be using sizeof, though. This is an operator, not a function, and its value is determined at compile time.
Reply


Messages In This Thread
Return problem ? I think - by Banditul18 - 02.04.2017, 19:15
Re: Return problem ? I think - by Toroi - 02.04.2017, 19:36
Re: Return problem ? I think - by Vince - 02.04.2017, 19:48
Re: Return problem ? I think - by GangstaSunny. - 02.04.2017, 19:54
Re: Return problem ? I think - by Banditul18 - 02.04.2017, 19:56
Re: Return problem ? I think - by Vince - 03.04.2017, 05:33
Re: Return problem ? I think - by GangstaSunny. - 03.04.2017, 08:08

Forum Jump:


Users browsing this thread: 1 Guest(s)