For some reason I\'m getting an error: statement with no effect
on this statement.
for (j = idx; j < iter; j + increment) {
printf(\"from lo
Replace
j + increment
With
j += increment
You probably meant to write j += increment
instead of j + increment
.
You are getting that as an error? How cool, I wish my compiler did that. Basically j + increment
will return the sum of those two, but j
won't get modified so your loop would probably run forever.
It's clear you meant +=, but in the case that isn't true, the 'volatile' qualifier should prevent warnings.
I think you meant j += increment
, as j + increment
doesn't actually alter j
or indeed have any side effects at all - it is a statement with no effect, which is what the compiler is telling you