What is the difference between static global and non-static global identifier in C++?

前端 未结 4 1563
走了就别回头了
走了就别回头了 2021-01-31 03:46

What is the difference between static global and non-static global identifier in C++?

4条回答
  •  無奈伤痛
    2021-01-31 04:22

    A global static variable is only available in the translation unit (i.e. source file) the variable is in. A non-static global variable can be referenced from other source files.

提交回复
热议问题