Hello,
I would like to use the indexOf function with Arduino 0019 program:
part of code:
int bytesread=0;
int maxbytes=5000;
String filecontents[maxbytes];
bytesread=file.read(filecontents, maxbytes);
if (bytesread >= maxbytes) PgmPrint("Error to much data in config file ");
file.close(); //Close the file
Serial.println("bytesread");Serial.print(bytesread);
// Serial.print(filecontents);
char line[80];
int sensorCounter;int weekdayCounter;int programCounter;
int oldposChar=0;
int newposChar=(filecontents.indexOf(';',0));
So I read a file (via sd shield) in the string filecontents.
I always get the following error on the indexOf function:
request for member 'indexOf' in 'filecontents', which is a non-class type 'String [(((unsigned int)(((int)maxbytes) + -0x000000001)) + 1)]'
Can anyone tell me what I'm doing wrong ?
Thanks in advance,
Jeroen.