C++ understandings