In C++, let's say that I have the following header file:
class Foo {
static int func0 (int, int);
static int func1 (int, int);
static int func2 (int, int);
static int func3 (int, int);
};
Is there anyway to do this via typedefs?
I tried:
class Foo {
typedef int(*func)(int, int);
static func func1;
static func func2;
static func func3;
static func func4;
};
And then in a cpp file
int Foo::func1(int a, int b) { return a + b; }
but I get the error:
Redefinition of func1 as different kind of symbol