LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CHR QUESTION in LABWINDOWS

I'm sorry for publish several messages.    My question is about  the conversion from Integer to CHR character, for example,    int i=65     ->   A.   How can I do it ?  Thank you very much for all.
0 Kudos
Message 1 of 3
(3,112 Views)

In C, you can freely assign int and char variables to each other, as they are both integral types. So:

int i;

char ch;

i = 65;

ch = i;

printf ("%c", ch);

will print the character 'A'. Or have I misunderstood your question?

JR

 

0 Kudos
Message 2 of 3
(3,106 Views)
Thank you very much IT'S WORKING.
0 Kudos
Message 3 of 3
(3,096 Views)