从另一个文件中使用函数的可能方法是什么,它是由静态初始化的? [英] what is possible way to use the function from the other file, which was initialized by a static?
问题描述
我的问题很简单。
我在我的程序中有三个文件。假设其中一个文件有静态函数。我可以使用另一个函数吗?
我知道文件本身访问的静态函数。我想知道任何可能的方法。
如果方式是可用的,我怎样才能停止函数声明方面的访问?
声明为文件范围静态的函数在文件外部是不可见的,这意味着您将无法然后,如果来自同一个文件的函数发出一个指向该函数的指针,代码将能够调用它,因为不涉及解析或查找。
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?
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.
这篇关于从另一个文件中使用函数的可能方法是什么,它是由静态初始化的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!