What is the difference between a member variable and a local variable?

前端 未结 7 775
再見小時候
再見小時候 2020-11-29 08:01

What is the difference between a member variable and a local variable?

Are they the same?

7条回答
  •  借酒劲吻你
    2020-11-29 08:46

    A local variable is the variable you declare in a function.

    A member variable is the variable you declare in a class definiton.

提交回复
热议问题