Afficher un message
Vieux 30/06/2008, 17h16   #3
Tim Love
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Implicit conversion from int to double

amphetaman@gmail.com writes:

>I know this might seem kind of silly, but is it necessary to cast int
>to double?


>Do I have to do


>int i = 42;
>double d = static_cast<double>(i);


>or can I just do d = i?

FYI I made a little quiz about this kind of stuff at
http://www-h.eng.cam.ac.uk//tpl/...ongtyping.html
  Réponse avec citation
 
Page generated in 0,04977 seconds with 9 queries