converting a string function name to an actual function call

mandel oh at no.es
Thu Nov 29 16:05:58 PST 2007


ok, my previous was wrong.

You can also write:
void insert(int function(int) [ char[] ] table, char [] name, int function(int) address) {
     table[ name ] = address;
}

funcAddressTable.insert("f1", &f1);
funcAddressTable.insert("f2", &f2); 



More information about the Digitalmars-d-learn mailing list