Const Propagation for Pointers
Learn about const and different ways to propagate const while using pointers.
We'll cover the following...
Propagation pointers
By using the keyword const
, we can inform the compiler about which objects are immutable. The compiler can then check that we don't try to mutate objects that aren't intended to be changed. In other words, the compiler checks our code for const
-correctness. A common mistake when writing const
...