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

后端 未结 4 1495
既然无缘
既然无缘 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:25

    Your code is nonsensical. Try

    saddr_size = (int)(*data2.ssize);
    

    But ... why is saddr_size declared int? Try

    socklen_t saddr_size;
    ...
    saddr_size = *data2.ssize;
    

    I also wonder why ssize is a pointer, rather that the size itself.

提交回复
热议问题