Skip to content

Instantly share code, notes, and snippets.

@njlr
Created September 7, 2017 10:42
Show Gist options
  • Select an option

  • Save njlr/01ae962f6d78ccc47fca3d1603f17ff3 to your computer and use it in GitHub Desktop.

Select an option

Save njlr/01ae962f6d78ccc47fca3d1603f17ff3 to your computer and use it in GitHub Desktop.
struct A {
 virtual std::string what() {
  return "A";
  }
};
struct B : public A {
 std::string what() override {
  return "B";
  }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment