Functions with string parameters Inside my main loop there is this string:

String string1;


I have a function that will take string1 as parameter, and use it to send this string as SMS.

sendSMS(string1);


This is the sendSMS() function (without parameters):

void sendSMS()
{ sms.beginSMS(remoteNumber);
  sms.print(finalstr);
  sms.endSMS();
  lcd.setCursor(0, 0);
  lcd.print("Message sent!");
  delay(10000); 
}


My questions are:


How do I put the string input parameter in sendSMS?
Do I also need to use a function prototype for sendSMS()? (so that it appears three times, 1 in the prototype, 1 in the declaration and one in the call). Or I don't need to use function prototype before the main loop()?
Just change

void sendSMS()


to

void sendSMS(const String&amp; thisIsAString)


You can then access the parameter inside the function with thisIsAString.
No, you do not need a prototype.