For loop iterations.

Hello , I would like to write a for loop that runs through the string length, advancing two steps each iteration. Also i would like to store the 1st of the 2 numbers in a variable L and the second in R. Thanks for the help!
1
2
3
4
for (int i = 0 ; i < the_string.length() - 2; i=i+2)
{
  // do something with index 0 and 2 and 4 and 6 and ...
}


What are these two variables L and R you're talking about?

Registered users can post here. Sign in or register to post.