Commit 8ab482f4 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

Report some typos from docker run -p 8888:8888 -it -e DISPLAY=:0 -v...

Report some typos from docker run -p 8888:8888 -it -e DISPLAY=:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v /Users/sebastien/Documents/Formations/GettingStartedCpp:/home/non_root_user/Formation/Cpp  --cap-drop=all formation_cpp:latest (they were 'lost' follwoing the splitting of one notebook in half).
parent 3f7a3230
Pipeline #247564 passed with stage
in 20 minutes and 50 seconds
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
"\n", "\n",
"### Multiple layer of inheritance\n", "### Multiple layer of inheritance\n",
"\n", "\n",
"A child class may also be the parent of another class (unless `final` is used - see later)\n", "A child class may also be the parent of another class (unless `final` keyword is used - we'll see this keyword in [polymorphism notebook](./7-polymorphism.ipynb#final-keyword)).\n",
"\n" "\n"
] ]
}, },
...@@ -347,9 +347,9 @@ ...@@ -347,9 +347,9 @@
" \n", " \n",
" private:\n", " private:\n",
" \n", " \n",
" double width_ = -1.e20; // Stupid value that would play havoc if not properly initialized\n", " double width_ { -1.e20 } ; // Stupid value that would play havoc if not properly initialized\n",
" // - std::optional (C++17) would probably a better choice.\n", " // - std::optional (C++17) would probably a better choice.\n",
" double length_ = -1.e20; \n", " double length_ { -1.e20 } \n",
"};" "};"
] ]
}, },
......
...@@ -942,7 +942,7 @@ ...@@ -942,7 +942,7 @@
"source": [ "source": [
"So you could devise a way to identify which is the dynamic type of your `PolymorphicVehicle` pointer and cast it dynamically to the rightful type so that extended API offered by the derived class is accessible.\n", "So you could devise a way to identify which is the dynamic type of your `PolymorphicVehicle` pointer and cast it dynamically to the rightful type so that extended API offered by the derived class is accessible.\n",
"\n", "\n",
"If you find this clunky, you are not alone: by experience if you really need to resort to **dynamic_cast** it's probably your data architecture needs some revision. But maybe the mileage vary for other developers, and it's useful to know the possibility exist." "If you find this clunky, you are not alone: by experience if you really need to resort to **dynamic_cast** it's probably your data architecture needs some revision. But maybe the mileage vary for other developers, and it's useful to know the possibility exists."
] ]
}, },
{ {
...@@ -951,7 +951,7 @@ ...@@ -951,7 +951,7 @@
"source": [ "source": [
"## `final` keyword\n", "## `final` keyword\n",
"\n", "\n",
"If you need to specify a class can't be derived, you may stick a `final` keyword in its declaration (from C++11 onward):\n" "If you need to specify a class that can't be derived, you may stick a `final` keyword in its declaration (from C++11 onward):\n"
] ]
}, },
{ {
...@@ -1195,7 +1195,7 @@ ...@@ -1195,7 +1195,7 @@
"source": [ "source": [
"struct DerivedClass4 : public BaseClass4\n", "struct DerivedClass4 : public BaseClass4\n",
"{\n", "{\n",
" DerivedClass4() = default;; \n", " DerivedClass4() = default;\n",
" \n", " \n",
" virtual std::string ClassName() const;\n", " virtual std::string ClassName() const;\n",
"};" "};"
...@@ -1287,7 +1287,7 @@ ...@@ -1287,7 +1287,7 @@
"source": [ "source": [
"struct DerivedClass5 : public BaseClass5\n", "struct DerivedClass5 : public BaseClass5\n",
"{\n", "{\n",
" DerivedClass5() = default;; \n", " DerivedClass5() = default; \n",
" \n", " \n",
" virtual std::string ClassName() const;\n", " virtual std::string ClassName() const;\n",
"};" "};"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment