For example, suppose we have two functions:
void sum(int x, int y)
{
return x+y;
}
void minus(int x, int y)
{
return x-y;
}
Is there a way to make a single function that does a sum or minus (or various other things) depending on which you want to use (perhaps by a keyword of some sort) without having to write separate functions explicitly?
Some one kind of beat me to this with the comments below the question, but here ya go!