easy to check multi-condition in C++