const Qualifier
Learn what const qualifiers are and how they work with pointers.
We'll cover the following
For reference types, adding the const
qualifier creates another overload. This behavior is great because it ensures the variable we pass remains unmodified. If const
was ignored here, the variable could be changed and could cause many issues down the line. However, that is not the case.
Reference type parameters
For reference type parameters, the const
qualifier is not ignored.
Get hands-on with 1400+ tech skills courses.