02.04.2017, 19:48
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.
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.