Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/22/04 10:04
Read: times


 
#74675 - RE: decimal to hexadecimal
Responding to: ???'s previous message
char* dectohex(char* dec)
{
char* hex;
int bin;
int check;
hex=(char*) malloc(4);
if(hex==NULL) exit(-1);
bin=atoi(dec);
if(bin==0 && dec[0]!='0') exit(-2);
check=sprintf(hex,"%X",bin);
if(check!=1) exit(-3);
return hex;
}


Sorry for being evil ;)
(as you see there's no task so simple you can't make it hard)

List of 9 messages in thread
TopicAuthorDate
decimal to hexadecimal            01/01/70 00:00      
   RE: decimal to hexadecimal            01/01/70 00:00      
   RE: decimal to hexadecimal            01/01/70 00:00      
   RE: decimal to hexadecimal            01/01/70 00:00      
   RE: decimal to hexadecimal            01/01/70 00:00      
      RE: decimal to hexadecimal            01/01/70 00:00      
         RE: decimal to hexadecimal            01/01/70 00:00      
         RE: decimal to hexadecimal            01/01/70 00:00      
            RE: decimal to hexadecimal            01/01/70 00:00      

Back to Subject List