Hi, I am using digi dynamic c. I am trying to convert this to a string
char readingreg[4]; readingreg[0] = 4a; readingreg[1] = aa; readingreg[2] = aa; readingreg[3] = a0;
Currently, when I do printf instructions, it should be as follows:
printf("This is element 0: %x\n", readingreg[0]);
But I want this on a line, so I can use a printf statement like this
printf("This is element 0: %s\n", readingreg[0]);
I need to send the readreg array through the TCP / IP port, for which I need to have it as a string. I can't seem to convert it to a string. Thank you for your help. Also, if someone can tell me how to do each element at a time, and not the whole array, that would be nice, since there will only be 4 elements.
source share