Why does C++ hate me?