Author
anonymous
about 5 years ago
Language
Compiler
Options
Author
anonymous
about 5 years ago
$
prog.cc: In function 'int main()':
prog.cc:16:31: error: 'Base::Base(int)' is protected within this context
16 | auto ptr = new Derived(123);
| ^
prog.cc:6:5: note: declared protected here
6 | Base(int) {}
| ^~~~
prog.cc:16:10: warning: unused variable 'ptr' [-Wunused-variable]
16 | auto ptr = new Derived(123);
| ^~~
Exit Code:
1