Y
Hacker News
new
|
ask
|
show
|
jobs
by
Banana699
1780 days ago
> C allows you to call functions by string
please elaborate
2 comments
garaetjjte
1780 days ago
Possibly OP meant dlopen/dlsym on itself? But that's a stretch, and not really language feature...
link
lights0123
1780 days ago
And functions aren't guaranteed to be included in the binary unless you pass additional compiler flags with that strategy.
link
_3u10
1780 days ago
Very few things are guaranteed in C. If you want to guarantee the function exists let the operating system look up the function names by string for you.
link
_3u10
1780 days ago
Create a string, look up the address of a function in the library. Assign the address to a function pointer, call it.
link