for loop statement has no effect

I don't understand why I am getthe warning "statement has no effect" on the folling line:

for(rightMarker; rightMarker >= leftIndex; --rightMarker){

the loop SEEMS to be working fine (although the method as a whole is not yet -- operator error)
for(rightMarker;

The first part of the statement won't do anything.
You can just leave the rightMarker thing out and write
 
for(; rightMarker >= leftIndex; --rightMarker){


Makes the warning go away and you got one useless statement less.


Makes the warning go away and you got one useless statement less.


ok, i do have several useless statements...however, rightmarker is an int variable that I want to define the start of my for loop. For any other int
for (int i=100; i >=variable; --i)
works, so is there a way to replace the first statement with an int variable?
Topic archived. No new replies allowed.