[c++/en] Added public declaration. Fixed #2805

This commit is contained in:
Andre Polykanine A.K.A. Menelion Elensúlë 2017-08-30 02:46:49 +03:00
parent bce21489d8
commit c076537cf9

View File

@ -8,7 +8,6 @@ contributors:
- ["Connor Waters", "http://github.com/connorwaters"] - ["Connor Waters", "http://github.com/connorwaters"]
- ["Ankush Goyal", "http://github.com/ankushg07"] - ["Ankush Goyal", "http://github.com/ankushg07"]
- ["Jatin Dhankhar", "https://github.com/jatindhankhar"] - ["Jatin Dhankhar", "https://github.com/jatindhankhar"]
--- ---
C++ is a systems programming language that, C++ is a systems programming language that,
@ -474,6 +473,7 @@ int main() {
// without a public or protected method for doing so // without a public or protected method for doing so
class OwnedDog : public Dog { class OwnedDog : public Dog {
public:
void setOwner(const std::string& dogsOwner); void setOwner(const std::string& dogsOwner);
// Override the behavior of the print function for all OwnedDogs. See // Override the behavior of the print function for all OwnedDogs. See