Talk About Network

Google





Programming > C - C++ Learning > Storing functio...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 10 Topic 4072 of 4400
Post > Topic >>

Storing function references in a map

by Hal Vaughan <hal@[EMAIL PROTECTED] > Mar 16, 2008 at 05:11 AM

I've been reading up on this, but I'm a bit confused so I'd love a nice,
simple example, if someone doesn't mind helping me.  I'd like to store
references to a number of functions in a map.  Each function will take no
arguments and will return nothing.  I've looked at examples, but when I
tried to do it on my own, I always got errors, but wondered if part of
that
is because I was trying to do this with functions with void for a return
type.

Also, if the map is going to be defined in one file and the function is in
another, if I put protofunctions (is that the right term for pre-defining
a
function earlier in a file or in a header?) in the file the map is in and
it comes before the file with the actual functions, will that create any
problem since the actual locations of the functions is not yet defined?

Hal
 




 10 Posts in Topic:
Storing function references in a map
Hal Vaughan <hal@[EMAI  2008-03-16 05:11:16 
Re: Storing function references in a map
"Jim Langston"   2008-03-16 00:02:22 
Re: Storing function references in a map
Daniel Dearlove <danie  2008-03-16 13:20:58 
Re: Storing function references in a map
Hal Vaughan <hal@[EMAI  2008-03-16 15:33:58 
Re: Storing function references in a map
"Jim Langston"   2008-03-20 01:43:49 
Re: Storing function references in a map
"Chris ( Val )"  2008-03-18 04:09:19 
Re: Storing function references in a map
"Andrew Koenig"  2008-03-18 15:26:30 
Re: Storing function references in a map
Anand Hariharan <mailt  2008-03-19 18:47:47 
Re: Storing function references in a map
"Chris ( Val )"  2008-03-21 03:45:12 
Re: Storing function references in a map
Anand Hariharan <mailt  2008-03-21 07:39:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 11:47:48 PST 2009.