Why the next compiler
std::vector<int(*)(double)> func_ptrs;
But it is not
std::vector<int(double)> func_ptrs
?
I get one of these ugly STL error messages in the second case, so I'm not going to post everything here, but at the end of the message I get this
/usr/include/c++/4.8/bits/stl_construct.h:102:30: error: ISO C++ forbids incrementing a pointer of type 'int (*)(double)' [-fpermissive] for (; __first != __last; ++__first)
C ++ seems to distinguish between int(double) and int (*) (double) . I got the impression that int(*)(double) and int(double) equivalent anyway? Or am I wrong?
I would like to clarify. Thanks in advance.
source share