#include #include #include #include using namespace std; struct SubAlgorithm1 { void operator ()
You should use an interface, with both SubAlgorithm1 and SubAlgorithm2 (you'll need better names than that) implementing the interface. The create an object of either class depending on runtime_flag.