some utilities for C++