I am currently doing a university practical in which I am to partially implement the game/puzzle Mu (http://en.wikipedia.org/wiki/MU_puzzle). When the user selects a rule to apply, it alters the c-string in a predefined manner. I currently have to use the function prototypes as defined from my lecturer, but it has led me to wonder: is there a way in which you can have a set of functions which perform similar actions and have the same prototype, but not have to define all of them individually? I don't mean function templating. Essentially, each of the functions alters the string in a different way, but have the same prototypes (with different names, obviously) and similar effects.
These functions would be testing if the rule can be applied, and the application of the rule itself. Thanks for any help- not asking for a detailed explanation, just point me to what I should read.