"ISO C++ forbids declaration of 'operator()' with no type"

Joined
Oct 11, 2008
Messages
1
Reaction score
0
Hi, I've inherited the following C++ code, originally written in the late 1990s, that compiles w/o error on Sun Solaris 5.8 with SUNWspro 4.2 CC. When this same code is compiled with a recent version of g++, however, all 5 of the signatures for 'operator()' are flagged as "ERROR:ISO C++ forbids declaration of 'operator()' with no type".

Any suggestion on how to change the 'operator()' signatures to be complliant with ISO C++?

Thanks!



class FunctionPtrETK;

typedef (FunctionPtrETK::*FP_ETK)(...);

class FunctionPtrETK
{
private:

void *arg1;
void *arg2;
void *arg3;

public:
FP_ETK func;
FunctionPtrETK *object;

FunctionPtrETK(void*, ...);
FunctionPtrETK();

//next 5 lines: ERROR: ISO C++ forbids declaration of `operator()' with no type

operator() ();
operator() (void *);
operator() (void *, void *);
operator() (void *, void *, void *);
operator() (void *, void *, void *, void *);

FunctionPtrETK* convert(void*, ...);
static FunctionPtrETK ptr;
};
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top