Arrays or variables containing executable functions
Is it possible to have an array or a struct that contains a void/int/float value that is a function? Like saying: This slot can be filled by the name of a function.
Here's what I mean:
(Let's say I have a function called "wootfunc").
It's a bit crazy, but is it possible in some way shape or form?
Here's what I mean:
(Let's say I have a function called "wootfunc").
Code:
typedef struct {
[INDENT]void *func();[/INDENT]
} myStruct;
myStruct fooThingy;
fooThingy.func() = wootfunc();
// Now let's execute fooThingy's function:
fooThingy.func();It's a bit crazy, but is it possible in some way shape or form?
| Messages In This Thread |
|
Arrays or variables containing executable functions - Jones - May 30, 2006 08:23 PM
Arrays or variables containing executable functions - OneSadCookie - May 30, 2006, 08:43 PM
Arrays or variables containing executable functions - Zekaric - May 30, 2006, 10:28 PM
Arrays or variables containing executable functions - Jones - Jun 1, 2006, 07:18 PM
Arrays or variables containing executable functions - Zekaric - Jun 2, 2006, 08:35 AM
|
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| New Space Simulator - light speed functions | gooncorp | 3 | 4,985 |
Jan 2, 2013 12:52 AM Last Post: NikG |
|
| C: Global Variables versus Parameters | Lizard Man | 10 | 4,973 |
Jan 13, 2010 08:22 PM Last Post: Lizard Man |
|
| Some quick help getting started with certain Carbon functions | zmwworm | 12 | 7,014 |
Jan 10, 2008 01:14 AM Last Post: zmwworm |
|
| Accessing an inherited class's variables | Tobs_ | 22 | 8,379 |
Feb 28, 2007 05:26 PM Last Post: mac_girl |
|
| Problems with variables in Obj-C | vnvrymdreglage | 16 | 5,921 |
Oct 2, 2006 10:19 PM Last Post: vnvrymdreglage |
|

