Your firmware processes a sensor reading in two different ways depending on whether the value is allowed to be modified or must be treated as read-only.
You must create two overloaded functions named process that differ only by const-correctness:
You must use function overloading with const and non-const references.
Do not merge both behaviors into a single function.
In main():
Example 1
Input:
5Output:
10
Example 2
Input:
-3Output:
readonly
Constraints:
The read-only overload must not modify the input
Input
5
Expected Output
10