Skip to content

Instantly share code, notes, and snippets.

@emarthinsen
Created October 18, 2014 02:56
Show Gist options
  • Save emarthinsen/2c66274eff545e46b295 to your computer and use it in GitHub Desktop.
Save emarthinsen/2c66274eff545e46b295 to your computer and use it in GitHub Desktop.
Vector of function pointers
ex6.54.cpp:12:11: error: unexpected type name 'func': expected expression
vector<*func> funcPtrs;
^
1 error generated.
#include <vector>
using std::vector;
int myfunc(int a, int b) {
return a + b;
}
typedef decltype(myfunc) func;
int main() {
vector<*func> funcPtrs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment