Home  >  Q&A  >  body text

谁能具体的讲一讲C++中的左值和右值

谁能具体的讲一讲C++中的左值和右值

迷茫迷茫2765 days ago752

reply all(4)I'll reply

  • 迷茫

    迷茫2017-04-17 12:08:11

    http://www.cnblogs.com/catch/p/3500678.html

    reply
    0
  • 迷茫

    迷茫2017-04-17 12:08:11

    What are the left and right values?
    Equal sign expression?

    reply
    0
  • 黄舟

    黄舟2017-04-17 12:08:11

    Lvalue is a value that can be placed on the left side of the equal sign (for example, an int variable can change its value or assign its value to others).
    Rvalues ​​are values ​​that can only be placed on the right side of the equal sign (such as the constant 0, which cannot be placed on the left side of the equal sign).

    For example, "0=i" is wrong, and "i=0" is right.
    Don’t worry about this issue, it’s just a way of saying it.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 12:08:11

    Things that cannot be assigned are called rvalues ​​(meaning they can only be on the right side of the assignment number), and others are called lvalues.

    reply
    0
  • Cancelreply