I had a problem
my mingw32 compilerr cannot compile this c code,
Code:
int exp1=5;
int exp2=-5;
int x,y;
int main()
{
if(!(exp1>exp2&&exp2<exp1)) {//Condition False
x=5;y=-5;
}
else {
x=0;y=0;
}
if((!(exp1!=exp2))||exp1==exp2) {//Condition True
x=1;y=1;
}
else {
return x,y;
}
if((!(x==0&&y==0))||x==y) {//Condition True
printf("Attack!");
}
else {
printf("RUN!");
}
return EXIT_SUCCESS;
} /*expected input first if statement false
expected input second if statement true
expected input third if statement true*/
i am using global variables though,
i didnt know where the code going wrong really
i cant figured this, anyone can explain whats wrong thing to me?
the error message was
ISO C++ forbids comparison between pointer and integer [-fpermissive]