fix some typos and misunderstandings of C++