biobier wrote:Thanks got it working!
This is my working code snipped in case it can help someone:Code: Select all
int tempSize = sizeof("%d.%d", (int)(lastTemp),(int)((lastTemp - (int)lastTemp)*100));
Sorry to nitpick, but sizeof() does not calculate the lenght of the string as you intend.
In this case it returns the size of a char pointer - 4 bytes.
I think you better use strlen().