Some old c++ code