Example
void
main(
int
argc,
char
* argv[]) {
for
(
int
i =
0
; i < argc; i++ ) {
if
( i <
5
) {
continue
;
}
cout << argv[ i ];
}
}
Solution
Negate the condition before the
continue
statement
Move the code below the
continue
statement to inside of the
if
block
void
main(
int
argc,
char
* argv[]) {
for
(
int
i =
0
; i < argc; i++ ) {
if
( i >=
5
) {
cout << argv[ i ];
}
}
}