-1
我有以下代碼:編譯時爲什麼我的變量報告爲「未聲明的標識符」?
for(int iY=0;iY<(Height-YRemainder);iY=iY+16);
{
for(int iX=0;iX<(Width-XRemainder);iX=iX+16);
{
if(Operation==BLACKNESS)
{
Operation = WHITENESS;
PatBlt(DeviceContext, iX, iY, 16, 16, Operation);
}
else
{
Operation = BLACKNESS;
PatBlt(DeviceContext, iX, iY, 16, 16, Operation);
}
}
if(Operation == BLACKNESS)
{
Operation = WHITENESS;
PatBlt(DeviceContext, Width-XRemainder,iY,16,16,Operation);
}
else
{
Operation = BLACKNESS;
PatBlt(DeviceContext, Width-XRemainder, iY, 16, 16, Operation);
}
}
當我編譯,我得到的報告針對每個PatBlt用於1x和1y未申報的標識符。我誤解了每個變量的範圍在這裏工作或者我錯過了什麼?
在此先感謝