Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Divide two integers and get a float
Message
Information générale
Forum:
Borland C++ Builder
Catégorie:
Librairie C++ standard
Divers
Thread ID:
01003810
Message ID:
01003843
Vues:
19
Herman,
Close but no cigar <s>. Well atleast it got me thinking in the right direction. The following code works, I have to type cast both ints:
float fRes = ((float) iOne) / ((float) iTwo);
Thank you very much for the help.

Sincerely,
Einar
>
>
>Hi Einar,
>
>I never use Borland C++. But what I know is (maybe) it's because of type casting. So try the following:
>
>float fRes = (FLOAT) iOne / iTwo;
>
>Hope it works
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform