IZ
ну 1-то уж можно не рассматривать как делитель, сразу начинай счётчик делителей с 1 а не с 0, и всё
Size: a a a
IZ
D
IZ
D
D
IZ
D
IZ
D
V
struct A{
std::string path;
A(){
std::cout << "constructor base" << std::endl;
}
A(const std::string& val){
this->path = val;
std::cout << "constructor string" << std::endl;
}
};
struct B : public A {
A a;
B() : a("123"){
std::cout << a.path << std::endl;
}
};
int main() {
B b;
return 0;
}
/*
stdout:
constructor base
constructor string
123
*/
DK
struct A{
std::string path;
A(){
std::cout << "constructor base" << std::endl;
}
A(const std::string& val){
this->path = val;
std::cout << "constructor string" << std::endl;
}
};
struct B : public A {
A a;
B() : a("123"){
std::cout << a.path << std::endl;
}
};
int main() {
B b;
return 0;
}
/*
stdout:
constructor base
constructor string
123
*/
IZ
struct A{
std::string path;
A(){
std::cout << "constructor base" << std::endl;
}
A(const std::string& val){
this->path = val;
std::cout << "constructor string" << std::endl;
}
};
struct B : public A {
A a;
B() : a("123"){
std::cout << a.path << std::endl;
}
};
int main() {
B b;
return 0;
}
/*
stdout:
constructor base
constructor string
123
*/
IZ
IZ
DK
IZ
IZ
DK
V
MK