Created
November 6, 2011 15:42
-
-
Save flyingmutant/1343046 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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