Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 为什么我的变量报告为;“未声明的标识符”;什么时候编译?_C_Variables_Scope - Fatal编程技术网

C 为什么我的变量报告为;“未声明的标识符”;什么时候编译?

C 为什么我的变量报告为;“未声明的标识符”;什么时候编译?,c,variables,scope,C,Variables,Scope,我有以下代码: 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

我有以下代码:

       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);
            }


        }

for(int iY=0;iY在for语句的末尾有分号,将它们转换为单行语句:

for(int iY=0;iY<(Height-YRemainder);iY=iY+16);
for(int-iY=0;iY
for(int iY=0;iY<(Height-YRemainder);iY=iY+16)