You could reduce all that code into
switch(arg){
case "+": cout<<add(x,y); break;
case "-": cout<<subtract(x,y); break;
case "*": cout<<multiply(x,y); break;
...
Type: Posts; User: Lesshardtofind
You could reduce all that code into
switch(arg){
case "+": cout<<add(x,y); break;
case "-": cout<<subtract(x,y); break;
case "*": cout<<multiply(x,y); break;
...
You could use a switch statement. Also the word argument could be swapped with operator which would make more sense.