Having this class :
class Automat
{
private:
// some members ...
public:
Automat();
~Automat();
void addQ(string& newQ) ;
void addC
How would you call it? C++ is not a dynamically typed language; it is statically typed. Therefore, everything you call must have a specific set of parameters, and each parameter must be typed. There's no way to call "some function" with some number of parameters and hope that it can be sorted out at runtime.
You need a specific interface. methodToDo
needs to have some kind of interface; without one, you cannot call it.
The best you might be able to do is to have multiple versions of handleStringSituations
, where each one takes a different member pointer type:
void handleStringSituations(string &stringOfSituation , Automat* autoToHandle ,void (Automat::*methodToDo) ()) ;
void handleStringSituations(string &stringOfSituation , Automat* autoToHandle ,void (Automat::*methodToDo) (string&)) ;
void handleStringSituations(string &stringOfSituation , Automat* autoToHandle ,void (Automat::*methodToDo) (Lamda&)) ;