Migrating from C to C++