Well, yes. You don't really allocate space for function pointers. But
what happens when someone does? They are pointers, after all.


On Sat, 19 Mar 2005 03:10:51 +0800, Paolo Alexis Falcone
<[EMAIL PROTECTED]> wrote:
> 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
> 


-- 
James Matthew B. Miraflor
2002-17119
BS Computer Science
University of the Philippines
Manila

(+63)02-2876007
+639197101941
Block 49 Lot 29 Phase 3 E2
Dagat-dagatan, Malabon City
Philippines
___________________________________________________________

"(One) wins his battles by making no mistakes. Making no mistakes 
is what establishes the certainty of victory, for it means conquering 
an enemy that has already been defeated."

Sun Tzu
The Art of War 
____________________________________________________________
--
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