Use an Asymmetric Assignment Operator to Assign Containers of Different Types
++ implicitly converts the operands’ types in expressions that involve different datatypes. Here’s a few examples: int n=5;double d=n; //5 implicitly converted to 5.0if (n==d) //same here Many programmers don’t