Dynamically creating functions in C

前端 未结 10 1581
-上瘾入骨i
-上瘾入骨i 2020-12-09 10:52

How can I dynamically create a function in C?

I try to summarize my C problem as follows:

  • I have a matrix and I want to be able to use some function

10条回答
  •  囚心锁ツ
    2020-12-09 11:13

    If you want to write code on the fly for execution, nanojit might be a good way to go.

    In your code above, you're trying to create a closure. C doesn't support that. There are some heinous ways to fake it, but out of the box you're not going to be able to runtime bind a variable into your function.

提交回复
热议问题