3802 shaares
3 results
tagged
c
Des problèmes de Floating point float & double.
Très intéressant.
via : https://shaarli.duraffort.fr/shaare/IWBoiA
Très intéressant.
via : https://shaarli.duraffort.fr/shaare/IWBoiA
Editeur en ligne pour les float <=> int en bit à bit.
Petite astuce en langage C pour afficher un nombre de caractères précis dans un printf.
// Only 5 characters printed. When using %.*s, add a value before your string variable to specify the length.
printf("Here are the first 5 characters: %.*s\n", 5, mystr); //5 here refers to # of characters
Cela évite un "snprintf".
Peut-être y a--t-il encore mieux ?
// Only 5 characters printed. When using %.*s, add a value before your string variable to specify the length.
printf("Here are the first 5 characters: %.*s\n", 5, mystr); //5 here refers to # of characters
Cela évite un "snprintf".
Peut-être y a--t-il encore mieux ?