Reply to post: Re: OT. Way to get a C dev to fall in love with another language.

Q. What's today's top language? A. Python... no, wait, Java... no, C

Anonymous Coward
Anonymous Coward

Re: OT. Way to get a C dev to fall in love with another language.

void *my_functions[100];

or in C++

std::array<std::any, 100> my_functions;

if you want to be particularly smart, wrap it in a simple class that has a std::enable_if that only allows you to store things for which std::is_invocable is true...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019