const Primitive Data Type
Learn about const primitive data type parameters.
We'll cover the following...
Let’s explore when to use const
parameters in the parameter list of function signatures. Let’s differentiate between fundamental types (also known as primitive data types) and class types.
Introduction
This section talks about primitive data types, such as bool
, int
, float
, char
, etc.
Should such parameters be taken as const
?
The answer is no, because it will be inefficient. We can access these data types with one memory read if ...