C++, not optimized