Hey guys ! I have an error that I can't get rid of. It's 'function does not evaluate to a function which takes 2 arguments'. I have tried modifying cmp_func to (*cmp_func) and (&cmp_func) but neither was the solution.
Here's the (shortened) code.
Code:class CoursMgr { public: private: typedef bool (CoursMgr::*CMP_FUNC)(int, int); // Gros HACK pas beau.. bool FONCTION_NULLE(int, int) { } };What's weird is that cmp_func can only be a pointer to ComparePPE, ComparePGE and another function, yet the code in blue compiles but not the code in red.Code:if(cmp_func == FONCTION_NULLE) if(ComparePPE(trav_it->NoteObtenue, a + b) && ComparePGE(trav_it->NoteObtenue, a - b)) ls_resultat.back().Travaux.push_back(*trav_it); else if(cmp_func(trav_it->NoteObtenue, donnee)) ls_resultat.back().Travaux.push_back(*trav_it);
Any help will be much appreciated.



LinkBack URL
About LinkBacks



Want to add some