user42833: this is my method
void mensaje_sms()
{   
  string numero = "777777";  // this is my variable           
  SIM900.print("AT+CMGF=1\r");
  delay(100);
      SIM900.println("AT+CMGS=\"591"numero"\"");
//IM900.println("AT+CMGS=\"59177777777\""); //only in this way does it work
      delay(100);
      SIM900.println("SEND NUMERO VARIABLE RODO");
      delay(100);
      SIM900.println((char)26);
      delay(100);
      SIM900.println();
      delay(5000);
      Serial.println("SMS sent successfully");
    }

how can I send a variable to println?

user27653: Change:
SIM900.println("AT+CMGS=\"591"numero"\"");

to
SIM900.print("AT+CMGS=\"591");
SIM900.print(numero);
SIM900.println("\"");

Note that only the final call is to println() (which just prints a carriage-return character at the end.)

42833: <p>this is my method</p>

<pre><code>void mensaje_sms()
{   
  string numero = "777777";  // this is my variable           
  SIM900.print("AT+CMGF=1\r");
  delay(100);
      SIM900.println("AT+CMGS=\"591"numero"\"");
//IM900.println("AT+CMGS=\"59177777777\""); //only in this way does it work
      delay(100);
      SIM900.println("SEND NUMERO VARIABLE RODO");
      delay(100);
      SIM900.println((char)26);
      delay(100);
      SIM900.println();
      delay(5000);
      Serial.println("SMS sent successfully");
    }
</code></pre>

<p><strong><em>how can I send a variable to println?</em></strong></p>
 27653: <p>Change:</p>

<pre><code>SIM900.println("AT+CMGS=\"591"numero"\"");
</code></pre>

<p>to</p>

<pre><code>SIM900.print("AT+CMGS=\"591");
SIM900.print(numero);
SIM900.println("\"");
</code></pre>

<p>Note that only the final call is to <code>println()</code> (which just prints a carriage-return character at the end.)</p>
