when i do this:
It works.Code:for(s=0; s<full; s++) { if((int)abs((ident[s].top/ident[s].bottom) - (tempIDTop/tempIDBottom)) < value); { value = (int)abs((ident[s].top/ident[s].bottom) - (tempIDTop/tempIDBottom)); positionID = s; } }
But if i add an else like this it doesnt work:
I get this error:Code:for(s=0; s<full; s++) { if((int)abs((ident[s].top/ident[s].bottom) - (tempIDTop/tempIDBottom)) < value); { value = (int)abs((ident[s].top/ident[s].bottom) - (tempIDTop/tempIDBottom)); positionID = s; } else { printf("%d\n", (int)abs((ident[s].top/ident[s].bottom) - (tempIDTop/tempIDBottom))); } }
Line 266 is the line starting with else.Code:process.c:266: error: ‘else’ without a previous ‘if’



LinkBack URL
About LinkBacks


