#include <iostream>
using std::cout;
using std::endl;
class A{
public:
A(){
cout << "parameterless" << endl;
}
A(const char *str){
cout << "Parameter is " << str <<endl;
}
};
class B{
A _argless;
A _withArg;
public:
// note that you need not call argument-less constructor explicitly.
B(): _withArg("42"){
}
};
int main(){
B b;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgc3RkOjpjb3V0Owp1c2luZyBzdGQ6OmVuZGw7CgpjbGFzcyBBewpwdWJsaWM6CiAgICBBKCl7CiAgICAgICAgY291dCA8PCAicGFyYW1ldGVybGVzcyIgPDwgZW5kbDsKICAgIH0KCiAgICBBKGNvbnN0IGNoYXIgKnN0cil7CiAgICAgICAgY291dCA8PCAiUGFyYW1ldGVyIGlzICIgPDwgc3RyIDw8ZW5kbDsKICAgIH0KfTsKCmNsYXNzIEJ7CiAgICBBIF9hcmdsZXNzOwogICAgQSBfd2l0aEFyZzsKCnB1YmxpYzoKICAgIC8vIG5vdGUgdGhhdCB5b3UgbmVlZCBub3QgY2FsbCBhcmd1bWVudC1sZXNzIGNvbnN0cnVjdG9yIGV4cGxpY2l0bHkuCiAgICBCKCk6IF93aXRoQXJnKCI0MiIpewogICAgfQp9OwoKaW50IG1haW4oKXsKICAgIEIgYjsKCiAgICByZXR1cm4gMDsKfQ==