static declaration of m follows non-static declaration

前端 未结 4 1191
暖寄归人
暖寄归人 2021-01-02 06:16

I am trying a small example to know about the static external variable and its uses. The static variable is of local scope and the external variable is of global scope.

4条回答
  •  不知归路
    2021-01-02 07:14

    remove the keyword static while declaring m and the errors will be removed and you will be able to get the answer as 50. The static keyword makes the scope to restrict within the file.

提交回复
热议问题