I really do not understand what is happening here but:
when I do:
colorIndex += len - stopPos;
for(int m = 0; m < len - stopPos; m++)
{
colorUniPos++;
}
it does not give me the same result as doing:
colorIndex += len - stopPos;
colorUniPos += len - stopPos;
I think it becomes off by one or something. Shouldn't both of these obtain the same result?
Thanks
如果len-stopPos <0,则不会产生相同的结果
如果len - stopPos
是正值或零,这是正确的,但对于负值, colorUniPos
只是保留其值,因为未执行循环。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.