The analyzer has detected that the outer loop counter in the post-statement of an inner loop is modified, which may indicate a logical error.
The simple version of this error looks like this:
for i := 0; i < M; i++ {
for j := 0; j < N; i++ {
a[i][j] = 0
}
}
In the inner loop, the i variable is incremented instead of j. The fixed code:
for i := 0; i < M; i++ {
for j := 0; j < N; j++ {
a[i][j] = 0
}
}
This diagnostic is classified as:
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders:
Take
a chance!