Commit f9b1bda4 authored by ROUVREAU Vincent's avatar ROUVREAU Vincent Committed by GILLES Sebastien
Browse files

Fix some typos and words ordering

parent 0612492b
......@@ -118,7 +118,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`std::cin` is a bit more tricky to use that the others, as the risk the operation fails is really higher. For instance, if you give a string in the code above it will become crazy and keep printing the same message \"Too high!\" or \"Too low!\" (be ready to restart the kernel...). The following code fixes this:"
"`std::cin` is a bit more tricky to use than the others, as the risk the operation fails is really higher. For instance, if you give a string in the code above it will become crazy and keep printing the same message \"Too high!\" or \"Too low!\" (be ready to restart the kernel...). The following code fixes this:"
]
},
{
......@@ -390,7 +390,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In C++ 11, `std::to_string()` and the [`stoi` (and similar functions for long, ](https://en.cppreference.com/w/cpp/string/basic_string/stol) were introduced to provide similar functionality with a more direct syntax:"
"In C++ 11, `std::to_string()` and the [`stoi` (and similar functions for long)](https://en.cppreference.com/w/cpp/string/basic_string/stol) were introduced to provide similar functionality with a more direct syntax:"
]
},
{
......@@ -434,7 +434,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"It is however useful to be aware of the pre-C++ 11 syntax, especially for the number to string conversion: 'arithmetic' operations between strings as `+` incur copies that are avoided with the `std::ostringstream` syntax... but the construction of such a `std::ostringstream` object is costly as well...\n",
"It is however useful to be aware of the pre-C++ 11 syntax, especially for the number to string conversion: 'arithmetic' operations between strings (as `+`) incur copies that are avoided with the `std::ostringstream` syntax... but the construction of such a `std::ostringstream` object is costly as well...\n",
"\n",
"C++ 20 should provide a better looking and more efficient syntax with `std::format` (see [this page](https://en.cppreference.com/w/cpp/utility/format/format) for more details).\n"
]
......@@ -445,9 +445,9 @@
"source": [
"## Formatting and manipulators\n",
"\n",
"You may act upon the exact formatting of the output\n",
"You may act upon the exact formatting of the output.\n",
"\n",
"I'll be honest: it's not what is the most refined tool in the C++ library, and you may long for the simplicity and power of something like Python (or even C `printf`, which while being a mess under the hood is much simpler to use...).\n",
"I'll be honest: it's not what is the most refined tool in the C++ library, and you may long for the simplicity and power of something like Python (or even C `printf`, which is much simpler to use while being a mess under the hood...).\n",
"\n",
"Once again `std::format` from C++ 20 should be a game changer here!\n",
"\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