cpp miscelenous stuff