how do i debug error: lvalue required as left operand of assignment?

后端 未结 4 1467
既然无缘
既然无缘 2021-01-20 04:50

I\'m compiling a .c program using gcc compiler on linux,

But , i received the error shown as \"error: lvalue required as left operand of assignment\"

The er

4条回答
  •  感情败类
    2021-01-20 05:44

    The left value you have cast it to a socklen_t * pointer type, however the right value is socklen_t type, so this error is printed. I have the same question as Jim Balter, you should make sure the socklen_t type can be expressed by int. I mean if int is 32 bytes, would socklen_t be more than 32 bytes? You should declare saddr_size socklen_t type

提交回复
热议问题