execute several types of expressions in C++