Guest User

Untitled

a guest
Jun 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. class Foo{
  2. };
  3.  
  4. class Bar : Foo{
  5. };
  6.  
  7. int main(){
  8. Foo x = Bar();
  9. // error: ‘Foo’ is an inaccessible base of ‘Bar’
  10. Foo y = (Foo)Bar();
  11. // error: ‘Foo’ is an inaccessible base of ‘Bar’
  12. }
Add Comment
Please, Sign In to add comment