0
votes

I got a typedef function pointer type defined as

typedef double(*fun)(const eValue&);

why is this line throwing an error: missing type specifier -int assumed? and syntax error: missing , before '&'?

can anyone help me?

Thanks in advance.

1
Sounds like eValue hasn't been declared in that scope. - Brian Bi

1 Answers

1
votes

The reason likely is that eValue is undefined.

Assuming it is an enum (just guessing from its name) try

enum eValue;
typedef double(*fun)(const eValue&);