I have the following class:
class conditionStack : public Stack
{
public:
bool even(int);
bool odd(int);
bool positive(int);
void push(bool(*)(int), int);
};
push function:
void conditionStack::push(bool (*p)(int), int a)
{
if (p(a))
Stack::push(a);
}
I call function in main.cpp in the following way
conditionStack Even;
Even.push(Even.even, value);
But as a result a have the following error
error C3867: 'conditionStack::even': function call missing argument list; use '&conditionStack::even' to create a pointer to member
I tried to call it as Even.push(&conditionStack::even, value);
But it doesn't work :( Could you help me?