Variables, Types and the C++ Compiler
C++ forces every variable to have a declared type, and that rigidity is exactly what makes the compiler so useful.
C++ forces every variable to have a declared type, and that rigidity is exactly what makes the compiler so useful.
Pointers have a reputation for being hard, and it's a little deserved, but the core idea is simpler than it sounds.
Every parameter in a C++ function makes a decision: does it get a copy of the data, or the real thing?
C++ classes feel familiar coming from Java or Python, but the destructor is something those languages don't really have.
A plain C++ array won't stop you reading past its end. std::vector is the safer, more flexible alternative.
In C++ you're handed the keys to memory management, and with them, the responsibility that most languages hide from you.
Templates exist so you don't have to write the same function twice just because C++ makes you declare types.
Lists, tuples and dictionaries all hold groups of values, but each one is built for a slightly different job.
How Python variables actually work, why there's no type keyword, and one division gotcha that catches everyone once.