what's an expression and expression statement in c++?

前端 未结 7 1713
遇见更好的自我
遇见更好的自我 2020-12-04 12:42

I\'ve read that usually statements in c++ end with a semi-colon; so that might help explain what an expression statement would be. But then what would you call an expression

7条回答
  •  一向
    一向 (楼主)
    2020-12-04 13:15

    An expression is part of a statement, OR a statement itself.

    int x; is a statement and expression.

    See this : http://en.wikipedia.org/wiki/Expression_%28programming%29

    http://en.wikipedia.org/wiki/Statement_%28programming%29

提交回复
热议问题