+ -
当前位置:首页 → 问答吧 → ubuntu安装jdk全过程(仅供参考)

ubuntu安装jdk全过程(仅供参考)

时间:2011-01-24

来源:互联网

比如有一个构造函数:
Myclass (int a, int b)

然后又重载了另一个构造函数:
Myclass (int *a)

我能不能直接使用代码:
this->Myclass(a[0], a[1])
定义第二个构造函数?
或者使用:
*this=Myclass(a[0], a[1])

作者: cuihao   发布时间: 2011-01-24

比如有一个构造函数:
Myclass (int a, int b)

然后又重载了另一个构造函数:
Myclass (int *a)

我能不能直接使用代码:
this->Myclass(a[0], a[1])
定义第二个构造函数?
或者使用:
*this=Myclass(a[0], a[1])

作者: cuihao   发布时间: 2011-01-24

比如有一个构造函数:
Myclass (int a, int b)

然后又重载了另一个构造函数:
Myclass (int *a)

我能不能直接使用代码:
this->Myclass(a[0], a[1])
定义第二个构造函数?
或者使用:
*this=Myclass(a[0], a[1])

作者: cuihao   发布时间: 2011-01-24