Skip to content

Instantly share code, notes, and snippets.

@mirekfranc
Created June 6, 2015 13:27
Show Gist options
  • Save mirekfranc/f7e8b900235b4b39907f to your computer and use it in GitHub Desktop.
Save mirekfranc/f7e8b900235b4b39907f to your computer and use it in GitHub Desktop.
struct using public inheritance by default...
#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