Created
June 6, 2015 13:27
-
-
Save mirekfranc/f7e8b900235b4b39907f to your computer and use it in GitHub Desktop.
struct using public inheritance by default...
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
#include <iostream> | |
class uh | |
{ | |
public: | |
void f () { std::cout << "uh" << std::endl; } | |
}; | |
struct shit : uh {}; // public inheritance by default | |
int | |
main () | |
{ | |
shit s; | |
s.f (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment