Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$ prog.cc: In instantiation of 'void derived<T>::setx(int) [with T = int]':
prog.cc:17:14: required from here
prog.cc:4:10: error: 'int base::x' is private
int x;
^
prog.cc:11:24: error: within this context
void setx(int i) {x=i;}
^
prog.cc: In instantiation of 'int derived<T>::getx() [with T = int]':
prog.cc:18:25: required from here
prog.cc:4:10: error: 'int base::x' is private
int x;
^
prog.cc:12:23: error: within this context
int getx(){return x;}
^
Exit Code:
1