int a{5},b{2},c{9}; double d = (double)a / (double)b + (double)c;
Or I can use static_cast. Either way is verbose, especially when the formula is long. Is there a better solution?
static_cast
Aucun commentaire:
Enregistrer un commentaire