Skip to content

Instantly share code, notes, and snippets.

@flyingmutant
Created November 6, 2011 15:42
Show Gist options
  • Save flyingmutant/1343046 to your computer and use it in GitHub Desktop.
Save flyingmutant/1343046 to your computer and use it in GitHub Desktop.
[MacBook-Pro-Gregory test]$ clang ya.cpp
ya.cpp:13:5: error: constructor for 'Bar' must explicitly initialize the base class 'Foo' which does not have a default constructor
Bar(int j) { i=new char[j]; }
^
ya.cpp:1:7: note: 'Foo' declared here
class Foo
^
ya.cpp:20:1: error: 'main' must return 'int'
void main()
^
ya.cpp:23:12: error: cannot cast 'Bar' to its private base class 'Foo'
Foo* b=new Bar(200);
^
ya.cpp:10:12: note: implicitly declared private here
class Bar: Foo
^~~
3 errors generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment