Arduino 1 conversion problem

Dear all, I'm sorry if this is a really stupid problem, I'm very short of time and have an issue with something which is due to the arduino upgrade. I've just installed Arduino 1 and a programme that was working previously is now telling me I have errors. The problem lies in a function that I am using to write to an LCD using the liquidCrystal.h library.

The function looks like this: void writeLCD(char a[], char b[], char c[], char d[]) ......

and I'm using this to send the data:

    String str = spl; (spl is an integer)
    str.toCharArray(charBuf2, 8);
    writeLCD("Split time", charBuf2, "milli seconds", "");

I'm receiving error "invalid conversion from 'int' to 'const char*'

I take it this is something to do with the update because it still compiles fine on the old version. Am I missing something very obvious?

Thanks, Ken

What's the type of charBuf2?

What's the type of charBuf2?

And it's size?

Apologies for not putting all the correct information -

the declaration is:

char charBuf2[8];

Thanks, Ken

Make the following change. It should work with the earlier versions of the Arduino codebase.


String str = spl;


String str(spl);

Thanks so much - that has indeed fixed the problem!