Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why can't the parameters of switch be true?
Why can't the parameters of switch be true?
Because switch can only be followed by types that can be automatically converted into plastics (including plastics), such as char, unsigned int and so on. The true type cannot be automatically converted into plastic. You can manually convert an int)double, but it will lead to a loss of accuracy. If you want to choose the real type in the future, you can multiply it by the multiple of 10, and then choose it, so that the accuracy will not be lost. But in this case, it's up to you.