double** 是指向 double* 类型的指针类型。 区别不是很显然的吗? double [5] 类型能隐式转换成 double* 类型,但它们不是同一类型。 可以考虑一下 short 和 long 这两种类型是能相互隐式转换的,但它们显然没有因此变成同一类型。 Also note that a double is a number, so it has the method intvalue, which you can use to get the value as a primitive int. En double se pueden almacenar números más grandes y también más decimales
Con los números que has probado no se ve diferencia porque cout << redondea la representación interna para mostrar pocos decimales, y lo que ves en ambos casos es lo mismo, pero internamente no son iguales.
I've read about the difference between double precision and single precision
However, in most cases, float and double seem to be interchangeable, i.e Using one or the other does not seem to affec. The long double function prototypes are identical to the prototypes for their double counterparts, except that the longdouble data type replaces the double data type The long double versions of these functions should not be used in new code.
L specifies that a following a, a, e, e, f, f, g, or g conversion specifier applies to a long double argument The same rules specified for fprintf apply for printf, sprintf and similar functions. You don't have to guess, just check the jls Int to double is a widening conversion
Widening primitive conversions do not lose information about the overall magnitude of a numeric value
[.] conversion of an int or a long value to float, or of a long value to double, may result in. In my earlier question i was printing a double using cout that got rounded when i wasn't expecting it How can i make cout print a double using full precision? 494 a double is not an integer, so the cast won't work
Note the difference between the double class and the double primitive