summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNami-Doc <vendethiel@hotmail.fr>2014-09-24 09:48:29 +0200
committerNami-Doc <vendethiel@hotmail.fr>2014-09-24 09:48:29 +0200
commit66f62c63cad4fa100ddc13368486538e0b7dd797 (patch)
treeeff37aa3ccf752abdb21625f59bee4ad106b588a
parentb6ba516743d4362b3f079872b1e60c1a54e72aee (diff)
parent7b95a1e9217c6a40d9300681adf1bc2f217507da (diff)
Merge pull request #787 from eternalthinker/patch-1
Added correct syntax for c++ inheritance.
-rw-r--r--c++.html.markdown7
1 files 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;