Can I make a double& with an int

A double& has to refer to a double, and myint is not a double. You’re actually building a temporary double and constructing a const double& to the temporary.

Leave a Comment