I am trying to make two functions. It should be pretty simple to make. It will take a character and return its hex value. Here is what I have but it doesn't seem to work.What am I doing wrong?Code:char tohex(char a){ char b; sprintf(b,"0x%x",a); return b; }
~Sven
EDIT-I did need to make the same thing for binary (hence the title) but I figured that one out.