Hello, i'm trying to get a char from an known position of a char array.
I have:
char clientline[128] //A char array to save data sent from the client (over the internet)
(strstr(clientline, "GET /&logg") != 0) { //using this to know the command needed
//When i get -> "GET /&logg1" or "GET /&logg2" or "GET /&logg3" .... or "GET /&logg9" or "GET /&logg#" or "GET /&logg%" or "GET /&logg&" --> each one will correspond to a month (so they are 12, because of 12 months)
char carMes = clientline.charAt(10); //By reading arduino.cc/reference i thought that this should be the function that i need
switch (carMes) {
case 1: ficheiroLer = "Jan.csv";
break;
case 2: ficheiroLer = "Fev.csv";
break;
case 3: ficheiroLer = "Mar.csv";
break;
case 4: ficheiroLer = "Abr.csv";
break;
case 5: ficheiroLer = "Mai.csv";
break;
.... until it performs 12 (for 12 months) to provide the download of a logg file.
I'm getting this error code " error: request for member 'charAt' in 'clientline', which is of non-class type 'char [128]' "
Need your help to understand what i'm doing wrong.
Thanks in advance!