|
|
От: | Великий Мессия | |
| Дата: | 30.06.25 15:33 | ||
| Оценка: | +1 | ||
<source>:24:11: error: 'print' is a private member of 'Child'
24 | child.print(10);
| ^
<source>:15:18: note: implicitly declared private here
15 | virtual void print(int x, int y)
| ^
<source>:24:11: error: too few arguments to function call, expected 2, have 1; did you mean 'Parent::print'?
24 | child.print(10);
| ^~~~~
| Parent::print
<source>:6:18: note: 'Parent::print' declared here
6 | virtual void print(int x)
| ^
2 errors generated.
Compiler returned: 1