2 ms·
> Additionally it's the only language I've ever worked in that provides ample opportunities to blow off your own foot while copying a string. False. std:
by otabdeveloper2 7y ago
> Additionally it's the only language I've ever worked in that provides ample opportunities to blow off your own foot while copying a string.
False.
std::string x = y;
There's no way to mess this up.
Again, learn the language. There is no such thing as "C/C++". 99% of the problems stem from the fact that people don't understand that C and C++ are completely different languages, despite sharing one compiler.
Learn C++ as itself and your problems go away.
> Lastly `const` what does it do where and why and should everyone ever use it...
`const` is a contract that means "I will not modify this object here". Nothing confusing or complex about it, unless you're trying to shoehorn this concept into C semantics somehow.