在这段代码中,答案为 0 是正确的,但我最终得到 -5。那么为什么这个简单的算术计算是错误的呢?可能发生了什么?
int daysFromCurrentDay = (i-(1 - weekDisplay));
// daysFromCurrentDay shows as 0 in the debugger.
// currentDay shows as 0 in the debugger.
daysFromCurrentDay -= currentDay;
// daysFromCurrentDay now shows as -5... What??