Answer the question
In order to leave comments, you need to log in
What does this line mean in C/C++?
double (*func)(double x);
- this variable stores the address of the function loaded from the *.so library. For me, such designs are still complicated. I guess this is an abbreviated record (probably). If so, what would the full record look like.
Answer the question
In order to leave comments, you need to log in
No, that's the full notation, a variable called func that holds a pointer to a function that takes a double and returns a double.
Read in a spiral: https://habr.com/en/post/100104/
If possible, it's better to use std::function - it's more readable
https://en.cppreference.com/w/cpp/utility/function.. .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question