Możesz użyć mapy.
#include <iostream>
#include <functional>
#include <map>
#define operation(x) []( auto a , auto b ) { return a x b; }
using namespace std;
template< typename T >
map<char,function<T(T,T)>> operations {
{'+' , operation(+) }, {'-' , operation(-) },
{'*' , operation(*) }, {'/' , operation(/) }
};
int main()
{
int a {0} , b {0};
char sign {0};
cout << "Input operation + , - , * , /" << endl;
cin >> sign;
cout << endl << "Input first number" << endl;
cin >> a;
cout << endl << "Input second number" << endl;
cin >> b;
cout << a << " " << sign << " " << b << " = " << operations<int>[sign](a,b) << endl;
return 0;
}