myGLCD.print("blue:", LEFT, 70,255,255,255);
int chnlD = 1; char *c; c=(char *)chnlD;
char *c; c=(char *)chnlD;
int red = 255;sprintf(c, "%d", red);
Do I understand sprintf correctly?
int red = 255;char *c;sprintf(c, "%d", red);
char c;sprintf(c, "%d", red);
Then, no, you are not using sprintf() correctly.The way you have c defined, it is a pointer. What does it point to? Nothing. And, yet, you as sprintf() to write to the memory pointed to by c.Code: [Select]char c;sprintf(c, "%d", red);would work.
It does work...but only partially
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16