C converting value char to string char -


how cast char=2 char="2" ?

i need send via uart, when im trying send char 2 nothing, when send "2" 2

the point is, have

int s=2;

and need write char "2" not 2. tried few ways failure. when char = 2 message in terminal empty, when char signed "2" works fine. when tries convert int char , char signed 2, can't send int via uart becouse block sending function needs pointer.

you can use itoa() convert integer char.

http://www.jb.man.ac.uk/~slowe/cpp/itoa.html


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -