Comment puis compter la longeur d'une string

Bonjour,
quand je tape "call" dans le terminal ce code rentre en action

 // MAKE A CALL
    if(!strcmp(inSerial,"call")){
       #ifdef DEBUG
          Serial.print(F("Starting Dialing "));
          Serial.println(number);  
        #endif
     
       
        if (inSerial.length()<5)  //To call variable 'number'    comand   c
         {  
          #ifdef DEBUG
            Serial.print(F("Dialing "));
            Serial.println(number);  
          #endif 
           call.Call(number);
         }else{
}

Le truc c'est que j'aimerais pouvoir compter la longeur du text "call".
S'il est c'est bien call, execute un code, si c'est call1, ou call2 ou call3 etc, fait une autre partie du code

Simplement, là, ca ne marche pas j'ai un message d'erruer:

rquest from member 'length' in 'inSerial', which is of non-class type 'char[20]'

Salut,

Tu essaies d'utiliser une fonction de la classe String alors que ton objet est un tableau de char

http://arduino.cc/en/Reference/String

Il nous faudrait la partie précédente de ton code pour t'aider

Hello

Ben en terme de code, je peux pas mettre plus en plus de ceci:

char inSerial[20];

 // MAKE A CALL
    if(!strcmp(inSerial,"call")){
       #ifdef DEBUG
          Serial.print(F("Starting Dialing "));
          Serial.println(number);  
        #endif
     
       
        if (inSerial.length()<5)  //To call variable 'number'    comand   c
         {  
          #ifdef DEBUG
            Serial.print(F("Dialing "));
            Serial.println(number);  
          #endif 
           call.Call(number);
         }
         
         /*
         if (inStr.length()==5)  //To call number in phone book position   comand   cx where x is the SIM position
         {
             error=call.GetPhoneNumber(inStr[1],number);
             if (error!=0)
             {
               Serial.print("Calling ");
               Serial.println(number);
               call.Call(number);
             }
             else 
             {
               Serial.print("No number in pos ");
               Serial.println(inStr[1]);
             }
         }
         */
    }

bonjour,
c'est la même réponse que pour la date du gps.
mets ton code ENTIER et non des bribes de codes.
ou alors un lien vers le code.

Bonjour,

Les Strings c'est le mal, sauf sur la plage bien sûr.

Pour ton problème : strlen().