Answers for "find out if it is the last iteration of the for loop c++"

C++
0

find out if it is the last iteration of the for loop c++

int Amount = 5;

for (int i = 0; i < Amount; i++) 
{

	bool IsLastIteration = i == (Amount-1);

}
Posted by: Guest on February-27-2022

Code answers related to "find out if it is the last iteration of the for loop c++"

Browse Popular Code Answers by Language