rvalue and lvalue

来源:互联网 发布:智者 观一叶而知秋 编辑:程序博客网 时间:2024/06/05 14:21

In C++, the distinction is less simple. In C++, an lvalue expression yields an object or a function.However, some lvalue, such as const objects, may not be the left-hand operand of an assignment.Moreover,some expressions yield objects as an rvalue,we use the object's value(its contents).When we use an object as an lvalue,we use the object's identity(its location in memory).


原创粉丝点击