07-18-2018 04:07 AM
07-18-2018 06:28 AM
Using "%x" format code in sprintf. This is not CVI, it's pure C
07-19-2018 06:43 AM
j'ai utilisé Fmt (hex, "%x<%i",dec) mais ça ne marche pas
07-19-2018 09:12 AM - edited 07-19-2018 09:13 AM
Since in this case Fmt expects an integer in output, the correct format should be
Fmt (&hex, "%x<%i", dec);
But this is really useless: there will be no difference in memory between dec and hex! As you surely know, hexadecimal, decimal, octal, binary... are only representations of the very same thing.
You correctly stated in your original question that you wanted a "hexadecimal string", so the correct call should be
char string[16]; Fmt (string, "%s<0x%x", dec);
07-19-2018 03:30 PM
Merci pour la réponse
Ça marche bien
Est-ce vous pouvez m'indiquer l'instruction qui convertir de hexadécimal au décimal
Et merci d'avance
07-19-2018 05:16 PM
That is, extract the number from an hexadecimal string?
sscanf (string, "%x", &dec);