Need help compiling in C: lvalue required as left operand of assignment

Hi,

I am trying to compile a program (not coded by me), and i'm getting this error:

203: error: lvalue required as left operand of assignment

As you may be guessing, the program doesn't compile, the line number 203 is the following:

if(((int)msg=addc(iphp,tcphp)))if(verbosity)fprintf(stderr,"%c%s",0x08,msg);

What am i missing? what's wrong here?

PostData: if someone wants to know which program it is, it's route's juggernaut, from phrack magazine.

Please, help!

It's probably that (int). You can't assign to something that's been typecast.

Hi,
Thanks for the reply, I did it modifiying it like this:

before:

if(((int)msg=addc(iphp,tcphp)))if(verbosity)fprintf(stderr,"%c%s",0x08,msg);

after:

if((msg=addc(iphp,tcphp)))if(verbosity)fprintf(stderr,"%c%s",0x08,msg);

You were right, thank you :wink: