© { JSL }
97
Text Box: ++ --
++ --
Folded Corner:
·you can overload ++ and  --
wa single operator supports prefix and postfix
wprefix returns the result of the call
wpostfix returns the operand before the call
struct Meter
{
    public static
        Meter operator ++ (Meter arg)
    {
        arg.value++;
        return arg;
    }
    ...
}
Folded Corner:
Meter distance;
...
postfix = distance++;
 
Folded Corner:
Meter distance;
...
prefix = ++distance;