From 7b95a1e9217c6a40d9300681adf1bc2f217507da Mon Sep 17 00:00:00 2001 From: eternalthinker Date: Wed, 24 Sep 2014 08:42:21 +0530 Subject: Added correct syntax for c++ inheritance. [more] Minor indent correction at namespaces intro example --- c++.html.markdown | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/c++.html.markdown b/c++.html.markdown index 7609dd46..5bf7e2ea 100644 --- a/c++.html.markdown +++ b/c++.html.markdown @@ -132,7 +132,7 @@ namespace myFirstNameSpace cos(int x) { printf("My inner soul was made to program."); - } + } } } @@ -266,10 +266,9 @@ int main () { //C++ Class inheritance -class German_Sheperd +class German_Sheperd : public Doggie { - //This class now inherits everything public and protected from Doggie class - Doggie d_dog; + //This class now inherits everything public and protected from Doggie class //Good practice to put d_ in front of datatypes in classes std::string d_type; -- cgit v1.2.3