Re-formatted shponimg.cpp, a C++ variant of shponimg.py