I'm writing something in c++ where I want to read text from a file that indicates correlations between Strings and Functions I have declared in my program. For example the file could read:
sin:sin
PI:getPi
+:add
I wanted the code to take this and create a hash table or vector of String and Function Pointer data structures. Unfortunately, I realize that code would not be able to find the name of functions at run-time, so I want to be able to put the addresses of these functions in the file. But this system would, of course, not work if the addresses of the functions were different every time the program ran or compiled. Enlightenment, or alternative solution to any of these problems would be great.