How to call the static function from another c file?

前端 未结 6 1639
谎友^
谎友^ 2021-02-07 22:48

I want to call a static function from another C file. But it always show \"function\" used but never defined.

In ble.c

6条回答
  •  梦毁少年i
    2021-02-07 23:12

     For restricting function access from other file, the keyword static is used 
    

    Access to static functions is restricted to the file except where they are declared.When we want to restrict access to functions from outer world, we have to make them static. If you want access functions from other file, then go for global function i.e non static functions.

提交回复
热议问题