Ele*_*Ent 2 c++ constructor c++11 delegating-constructor
我有一个有两个构造函数的类.
class Foo {
Foo(B b) {... }
Foo(int n) : Foo(buildBFromInt(n)) {} ??
}
Run Code Online (Sandbox Code Playgroud)
第一个需要一些对象,我想要第二个首先从更简单的类型创建对象.这可能吗 ?
归档时间: |
|
查看次数: |
190 次 |
最近记录: |