The class Distance is already defined with:
Distance
meters
getMeters()
Your task is to overload the + operator so that two Distance objects can be added together.
+
The result must be a new Distance object whose meters value is the sum of the two operands.
This problem is designed for embedded C++ practice, where explicit data sizes and predictable behavior are required.
Example
Input:
5 7
Output:
Total=12
Constraints
int32_t
Test Cases
Test Results
Input
Expected Output