what is possible way to use the function from the other file, which was initialized by a static?

烈酒焚心 提交于 2019-12-08 07:34:04

问题


My question is simple.

I have three files in my program.suppose one of files has static function.how can I use that function from the other one?

I knew that static function accessed by the files itself.i want to know any possible way.

If the way is available, how can i stop that access in terms of function declaration?


回答1:


A function declared as file-scope static will not be visible from outside the file, meaning that you will not be able to look the function up by name etc. However, if a function from the same file hands out a pointer to the function, code will be able to call it, since there is no resolving or lookup involved.



来源:https://stackoverflow.com/questions/20812996/what-is-possible-way-to-use-the-function-from-the-other-file-which-was-initiali

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!