473,385 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how will u call this fn

ok guys
its
void *fn(int *a,int *b);
main
{
-----
-----
}
how will you call this fn without using it in main ?

Nov 15 '05 #1
3 1317
re*******@gmail.com wrote:
ok guys
its
void *fn(int *a,int *b);
main
{
-----
-----
}
how will you call this fn without using it in 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
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Nov 15 '05 #2
On 22 Aug 2005 12:34:51 -0700, re*******@gmail.com wrote:
ok guys
its
void *fn(int *a,int *b);
main
{
-----
-----
}
how will you call this fn without using it in 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.
---------------------------------------------
Thanks.
MCheu
Nov 15 '05 #3
In article <11*********************@o13g2000cwo.googlegroups. com>,
<re*******@gmail.com> wrote:
ok guys
its
void *fn(int *a,int *b);
main
{
-----
-----
}
how will you call this fn without using it in 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()

--
"This was a Golden Age, a time of high adventure, rich living and
hard dying... but nobody thought so." -- Alfred Bester, TSMD
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

90
by: Mark Hahn | last post by:
"Michael Geary" <Mike@Geary.com> wrote ... >Does anyone have some sample code where obj$func() would be used? > (Apologies if I missed it.) There have been so many messages about delegation...
14
by: ajikoe | last post by:
Hello, If I use os.remove(fileName), does it always assure that the code will move to the next code only if the fileName is deleted completely? Pujo
205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
4
by: yf | last post by:
A KB article "http://support.microsoft.com/default.aspx?scid=kb;en-us;209599" tells that the maximum number of records that a table may hold if the PRIMARY key data type is set to AUTONUMBER is...
11
by: Ted Miller | last post by:
Hi folks. So I'm in the middle of porting a large (previously COM-based) imaging library to .Net. The clients of this library are VB programmers within the company I work for. Their code will be...
5
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all...
1
by: Ryan Liu | last post by:
Hi, Why TcpClient has a method TcpClient.GetStream(), not just a read only property? By implementing it as a method, does that mean, each time GetStream() could return a different stream? In...
10
by: Chris Thomasson | last post by:
I am working on a high-speed futures implementation in C++, and was tinkering around with ways to wrap the function pointer logic. I am a C/Assembly programmer that doesn't make a lot of use of...
2
by: JDeats | last post by:
>From my development envrionment (i.e. a single WinXP notebook PC) I have a basic AJAX application that is making the call to a Windows Form page that just returns the request back to the AJAX...
15
by: asm23 | last post by:
Hi, everyone, I'm studying the <<Thinking in C++>volume Two. In Chapter One, the example code : Auto_ptr.cpp //------------------------------------------------------- #include <memory> #include...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.