summaryrefslogtreecommitdiffhomepage
path: root/c++.html.markdown
diff options
context:
space:
mode:
authoreternalthinker <rahulanand.fine@gmail.com>2014-09-24 08:42:21 +0530
committereternalthinker <rahulanand.fine@gmail.com>2014-09-24 08:42:21 +0530
commit7b95a1e9217c6a40d9300681adf1bc2f217507da (patch)
treeeff37aa3ccf752abdb21625f59bee4ad106b588a /c++.html.markdown
parentb6ba516743d4362b3f079872b1e60c1a54e72aee (diff)
Added correct syntax for c++ inheritance.
[more] Minor indent correction at namespaces intro example
Diffstat (limited to 'c++.html.markdown')
-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;