diff --git a/2-ObjectProgramming/1-Introduction.ipynb b/2-ObjectProgramming/1-Introduction.ipynb index 23da4eb32cbd75c1c23775f9c757aa937530da0a..0a972ce94e6d71ade83a60b33435c2bc35f7c9ff 100644 --- a/2-ObjectProgramming/1-Introduction.ipynb +++ b/2-ObjectProgramming/1-Introduction.ipynb @@ -163,9 +163,7 @@ "metadata": {}, "source": [ "### The semicolon at the end of a `struct`\n", - "This comes historically from the C, where a `struct` is considered as a type declaration and it allows to do:\n", - "\n", - "**Xeus-cling issue:** Here cling doesn't manage to compile it but it is accepted rightfully by a full-fledged compiler (see for instance [@Coliru](http://coliru.stacked-crooked.com/a/3b77606ea8082485)):" + "This comes historically from the C, where a `struct` could be defined and initialized at the same time (or should - Xeus-cling doesn't manage it... As usual you may check a full-fledged compiler accepts it [@Coliru](http://coliru.stacked-crooked.com/a/3b77606ea8082485)):" ] }, { @@ -174,6 +172,8 @@ "metadata": {}, "outputs": [], "source": [ + "// Xeus-cling issue (at least circa May 2021)\n", + "\n", "struct Vector\n", "{\n", " double x;\n", @@ -190,7 +190,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This is the reason why a semicolon is always required at the end of a `struct` or a `class` declaration." + "This is absolutely **not** encouraged in C++, but it may help you to remember always closing a `struct` (or later a `class`) with a semicolon." ] }, {