Loops parameters | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Loops parameters

It is good to remember that the parameters can not only be numbers but also logical statements or other variables

24th Aug 2018, 2:26 AM
Juan Lasprilla
1 Answer
+ 1
It also can be a function call and can changes between iterations that can cause logical errors. For example in c++ following will never stop: for (int i = 0; i < vector.size(); ++i) vector.push_back(i);
24th Aug 2018, 4:12 AM
Sergey Ushakov
Sergey Ushakov - avatar