The class Distance is already defined with:
metersmetersgetMeters() that returns the stored valueYour 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
meters is a signed 32-bit integer (int32_t)
Input
5 7
Expected Output
Total=12