[Solved] Why parameter can be passed to constructor by assignment operator at object initialization? [closed]
A constructor like the one shown in your question could be called a conversion constructor. It allows the compiler to take a value of the argument type and convert it to an instance of the class. In your example, the line a = b; is equal to a = a(5); (Well, with the exception of … Read more