mam metodę klasy Pqueue:
template<typename Type>Pointer<Type> Pqueue<Type>::getpointer(parg args,Type * target)
{
Type * help;
for (unsigned int i=0; i<pqueue.size(); i++)
{
if ( args<pqueue[i]>(target) )
{
help=pqueue[i];
return Pointer<Type*>(true,&help);
}
}
return Pointer<Type*>(false,NULL);
}
a tutaj definicja klasy pqueue:
template<typename Type>class Pqueue
{
public:
vector<Type*>pqueue;
public:
typedef bool( * parg )(Type*);
void add(Type * pointer);
void remove(Type * pointer);
int size();
Type * operator [] (int index);
Pointer<Type> getpointer(parg arg,Type * pointer);
Pqueue();
Pqueue(Type* target);
Pqueue(vector<Type*> target);
Pqueue(const Pqueue& target);
~Pqueue();
};
i definicja klasy pointer
template<typename Type>struct Pointer
{
Type * wpointer;
bool correct;
Pointer<Type>();
Pointer<Type>(bool Correct,Type * pointer);
Pointer<Type>(const Pointer<Type> & target);
~Pointer<Type>() {}
};
a tutaj błąd:
nta.hpp|210|error: comparison between distinct pointer types 'Pqueue<Window>::parg {aka bool (*)(Window*)}' and 'Window*' lacks a cast [-fpermissive]|
jak naprawić ten błąd?