构造函数两个点

时间:2014-06-03 09:28:42

标签: c++ constructor

class X {
  public:
    X(int ii = 0) : i(ii) { 
     j = i; // j can't be accessed by non-static methods
}

: i(ii)是什么意思?更准确地说,这两个点。

0 个答案:

没有答案