We have already defined a class Sensor with:
int value
void printValue()
Sensor Value: <value>
Your task is to:
Sensor
value = 88
printValue()
Example
Output:
Sensor Value: 88
Why this output?
Because the object pointer is used with the arrow operator (->) to access the variable and function.
Question Significance
Introduces object pointers, showing how to access class members with -> instead of ..
Test Cases
Test Results
Input
Expected Output