I want to override my extraction operator for MyClass, which has three int attributes, the first one has no more than three digits, the second one two and the last one.
The input has to be strictly like this: 123-45-6789, if one of the parts has less digits than the maximum, the user must enter extra 0s, like 001-02-3456.
How should I make this? Should I read each letter as a char and then create the three ints? What would be the best way to create an int given a number of chars?