在声明centsLeft变量时,将其初始化为0或其他初始值。例如:
int centsLeft = 0;
或者在程序流程中保证centsLeft一定被赋值。例如:
int centsLeft; if (someCondition) { centsLeft = 100; } else { centsLeft = 50; }
上一篇:变量参数的stdcall(被调用者清理)中的堆栈清理
下一篇:变量超出范围或无法识别。