“l-value required” error

前端 未结 11 2165
离开以前
离开以前 2020-12-10 00:06

When do we get \"l-value required\" error...while compiling C++ program???(i am using VC++ )

11条回答
  •  天命终不由人
    2020-12-10 00:38

    You are trying to use an invalid value for an l-value somewhere in your code. An l-value is an expression to which a value can be assigned.

    For example, you might have a statement like the following:

    10 = x;
    

    where you should instead have:

    x = 10;
    

    Although it is probably not this obvious in your case.

提交回复
热议问题