c++ smart point