When to use static keyword before global variables?

前端 未结 8 512
再見小時候
再見小時候 2020-11-28 20:12

Can someone explain when you\'re supposed to use the static keyword before global variables or constants defined in header files?

For example, lets say I have a head

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 20:59

    global static variables are initialized at compile-time unlike automatic

提交回复
热议问题