On Sat, 19 Mar 2005 01:44:53 +0800, James Matthew Miraflor
<[EMAIL PROTECTED]> wrote:
> What happens when you instantiate a function pointer, i.e. use a
> malloc to a function pointer? Do I get a new "function" which accepts
> parameters but does not do anything? Can I then create arrays or
> linked data structures of such instantiated "functions"? Please reply.

A pointer to a function in C would make that function capable of being
assigned with values, placed in arrays, or passed by or returned by
other functions. This can be used to enable certain techniques such as
making functions a member of a struct - akin to member functions in
C++ (as you can't have functions as members of a struct in C).

You don't allocate space for a function pointer.

-- 
Paolo Alexis Falcone
[EMAIL PROTECTED]
--
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to