Re: how to use static function defined in one file in another file is that impposiible in 'c '




rashmi wrote:
> how to use static function defined in one file in another file is
that
> impposiible in 'c '

You could always have a wrapper function in the same file containing
the static function. This function would be of external linkage and
would invoke the static function internally.
So, you would have two functions in this file:
static my_static_fun{};
and the wrapper function
my_static wrapper
{
my_static_fun();
};

Then, you just include a header file containing the prototype of this
function in the other file from which you want accs to the static fun.

.



Relevant Pages