Back to this topic, if you don't convert, you divide two integers and the result is still an integer (the remainder is ignored), and then convert this integer into a floating-point number (that is, assign this integer to a floating-point type, which is implicit conversion). After adding this conversion, floating-point numbers are divided by integers, and the result is floating-point numbers.
In addition, the old-fashioned transformation may be written as follows: double aspect = (double) width/height; This conversion is still compatible in C++, but it does not check the data type, which may lead to information loss or unknown consequences, and the compiler will issue a compilation warning for this.