La methode format de CString
tafiscobar
Messages postés
1281
Statut
Contributeur
-
ariock -
ariock -
voila, je ne sais pas pourqoi, VC++ refuse de formater une varaible de type double, voici le code :
double resultat=10;
CString titi;
titi.Format("%d",resultat);
AfxMessageBox(titi);
//a chaq fois, c'est 0 qui est affiche.
par contre si je fais cela :
titi.Format("%d",10);
AfxMessageBox(titi); //10 est affiche
si vous pouvez m'aider,je ne refuse pas, j'ai essaye FormatV,la il refuse titi.FormatV("%d",resultat); //impossible de convertir from double to const char*
tafiscobar
double resultat=10;
CString titi;
titi.Format("%d",resultat);
AfxMessageBox(titi);
//a chaq fois, c'est 0 qui est affiche.
par contre si je fais cela :
titi.Format("%d",10);
AfxMessageBox(titi); //10 est affiche
si vous pouvez m'aider,je ne refuse pas, j'ai essaye FormatV,la il refuse titi.FormatV("%d",resultat); //impossible de convertir from double to const char*
tafiscobar
A voir également:
- La methode format de CString
- Format epub - Guide
- Format factory - Télécharger - Conversion & Codecs
- Hp usb disk storage format tool - Télécharger - Stockage
- Format apfs - Guide
- Format bin - Guide