Skip to content

Instantly share code, notes, and snippets.

@itczl22
Created November 6, 2016 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itczl22/c86ac5c11b527bc625875cae85e37446 to your computer and use it in GitHub Desktop.
Save itczl22/c86ac5c11b527bc625875cae85e37446 to your computer and use it in GitHub Desktop.
  • 类里边 类成员变量只能声明不能定义,由构造函数对其定义
  • 如果类中含有常量(const属性不可改值)或引用型(定义时就得给值)的成员变量,必须通过初始化表对其初始化
  • 在类的声明中给定构造函数的缺省值,类的实现里边不能给定缺省值
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment