Yeah, some snippets are just wrong. Like "C++ float to int" [0].
I have expected something like:
auto foo = static_cast<int>(1.5);
but the first snippet was:
cout << 4.35
and the second:
int n = (4.35 * 100) + 0.5; cout << n;
[0] https://justshowmethecode.com/code-example/c%2B%2B/22xfc/c-f...