1.E0266 “plus” is ambiguous
名称跟std中的函数重复了。
2.How transform integer into double implicitly?
Anser:You can multiply by 1.0:
int a{5}, b{2}, c{9};
double d = 1.0 * a / b + 1.0 * c;
And when you work with sums you can add to 0.0:
double d = 0.0 + a - b + c;
3.接上个问题,注意计算机上double的值很比本来小一点点,注意加上一个很小的值
double m = cents / 100.0;
m += dollars + 0.001//not plus directly;
m = m / 100;
4.int[] 的引用为:int (&a)[]、int (&a)[3]