user3979554
user3979554

Reputation: 15

Typedefs for function pointer type

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.

Upvotes: 0

Views: 191

Answers (1)

AlexD
AlexD

Reputation: 32576

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&);

Upvotes: 1

Related Questions