13 lines
172 B
C++
13 lines
172 B
C++
struct Base {
|
|
explicit Base(int) {}
|
|
};
|
|
|
|
struct Derived : Base {
|
|
Derived(int first, int second);
|
|
};
|
|
|
|
Derived::Derived(
|
|
int first,
|
|
int second)
|
|
: Base(first + second) {
|
|
}
|