Par masque binaire 0x80000000 pour tester le bit haut, cela en boucle et décalage gauche.
void __stdcall LongToFullBin(long n, char *psz)
{
long shft = 32;
do {
*psz++ = (n & 0x80000000) ? '1': '0';
n <<= 1;
} while(--shft);
*psz = 0;
}
ciao...
[ Lien ]BruNews, MVP VC++