Why can't one ctor call another ctor to initialize the object
Posted
by skydoor
on Stack Overflow
See other posts from Stack Overflow
or by skydoor
Published on 2010-03-16T18:01:14Z
Indexed on
2010/03/16
18:11 UTC
Read the original article
Hit count: 136
c++
class Foo {
public:
Foo() { Foo(1)}
Foo(int x, int y = 0):i(x) {}
private:
int i;
}
Can anybody give me some reasonas about can I do this? If not why?
© Stack Overflow or respective owner