how will u call this fn

M

Michael Mair

ok guys
its
void *fn(int *a,int *b);
main
{

Try to rephrase your question in clear English; mention what you
want to achieve. Do not use pseudocode but a minimal example
exhibiting your problem. This helps us help you.

-Michael
 
M

MCheu

ok guys
its
void *fn(int *a,int *b);
main
{

I suppose an obvious solution would be to wrap fn() inside another
function and call that second function in main() instead of fn(). Of
course, depending on the cirumstances (which you haven't shared), this
may or may not be useful to you.
 
W

Walter Roberson

ok guys
its
void *fn(int *a,int *b);
main
{

Depends what you mean by "using" it. For example if you register
it as a signal handler or an atexit handler, then it will be invoked
and yet it will not be invoked "in main".

For some meanings of "using it": you could pass a pointer to the
function into a lower level routine and have it called there through
a function pointer. The function -pointer- will have been "mentioned"
in main, but not "used" in main [in the traditional "use" vs
"mention" sense.]

Also, your specific implementation may allow the entry point to
be changed to something other than main()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top