worte up C++ example