urgent help

Hello , I am using a peice of code in my project to send an SMS now what should i do if i wanted to

replace the number in

mySerial.println(“AT+CMGS=+YYxxxxxxxxx\”\r”);

with a variable which can store the number , For example

num=+xxxxxxxxxxx;
mySerial.println(“AT+CMGS=\num\”\r”);

THE CODE IS AS :-

#include <SoftwareSerial.h>

SoftwareSerial mySerial(9, 10);

void setup()
{
mySerial.begin(9600); // Setting the baud rate of GSM Module
Serial.begin(9600); // Setting the baud rate of Serial Monitor (Arduino)
delay(100);
}

void loop()
{
if (Serial.available()>0)
switch(Serial.read())
{
case 's':
SendMessage();
break;
case 'r':
RecieveMessage();
break;
}

if (mySerial.available()>0)
Serial.write(mySerial.read());
}

void SendMessage()
{
mySerial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode
delay(1000); // Delay of 1000 milli seconds or 1 second
mySerial.println("AT+CMGS="+93XXXXXXX"\r"); // Replace x with mobile number
delay(1000);
mySerial.println("I am SMS from GSM Module");// The SMS text you want to send
delay(100);
mySerial.println((char)26);// ASCII code of CTRL+Z
delay(1000);
}

void RecieveMessage()
{
mySerial.println("AT+CNMI=2,2,0,0,0"); // AT Command to receive a live SMS
delay(1000);
}

BUT WONT THAT REWRITE THE AT+CMGS COMMAND AGAIN AND AGAIN ?? !!

like this :-

char num[15]={+92xxxxxxxx};
mySerial.print(“AT+CMGF=1”);
mySerial.print(“\r”);
delay(500);
mySerial.print(“AT+CMGS="”);

mySerial.print(“num");
mySerial.print(“\r”);
delay(300);

please do guide me a lil bit if i got the array right im a little weak in programing

i tried it the code is compiling right but the serial monitor gives an error on sending the s for send message , I wrote this :-

mySerial.println("AT+CMGS=");
mySerial.print(num);
mySerial.print("\r");

where num is as :-

char* num="+92xxxxxxxxx";

void setup() {
  // put your setup code here, to run once:


    char num[] = "1234567890";

    Serial.begin(9600);

    int size1 = sizeof(num) - 1;

    for (int i = 0; i < size1; i++)
    {
        Serial.println(num[i]);
    }

    Serial.println("done");
}

Try something like

char* num = "+92xxxxxxxxx";

void setup() {
  Serial.begin(115200);
  Serial.print("AT+CMGS=");
  Serial.println(num);
}
void loop() {}