user45347: I got this error in the following program:
#include <SoftwareSerial.h>
#include <dht.h>
dht DHT;
int a;
String temp;
String humid;
SoftwareSerial esp(0, 1);
#define SSID "abcd"
#define PASS "99999999"

void sendAT(String cmd) {
  Serial.print("SEND=");
  esp.println("cmd");
  Serial.println("cmd");
}

boolean connectwifi() {
  Serial.println("AT+CWMODE=1");
  delay(2000);
  Serial.println("AT+CWLAP");
  String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";
  sendAT(cmd);
  delay(5000);
  if (Serial.find("ERROR")){
    Serial.println("Recieved:Error could not connect");
    return false;
  }
  else{
    Serial.println("Wifi connected \n");

  }
  cmd="AT+CIPMUX=0";
  sendAT(cmd);
  if(Serial.find("Error")){
    esp.print("RECIEVED ERROR");
    return false;
  }
}

  void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  esp.begin(115200);
  send("AT");
  delay(5000);
  if(Serial.find("OK")){
    Serial.println("Recieved:OK\n ESP ready to send data\n");
    connectwifi();

  }

}

  void loop() {
  // put your main code here, to run repeatedly:
  a=DHT.read11(5);
  temp=DHT.temperature;
  humid=DHT.humidity;
  Serial.println("temperature: ");
  Serial.println(temp);
  Serial.println("humidity: ");
  Serial.println(humid);
  Serial.print("\n");
  updateTS(temp,humid);
  delay(3000);




}


void updateTS(String T, String H){
  String cmd="AT+CIPSTATRT=\"TCP\",\"api.thingspeak.com\",80";
  sendAt(cmd);
  delay (2000);
  if (Serial.find("Error")){
    Serial.print("Recieved :Error\n EXIT1");
    return;
  }
  cmd="GET/update?key=CJWN3VJZCQVTJD2J&field1="+T+"&field2+"+H+"\r\n";
  Serial.println("AT+CIPSEND=");
  Serial.println(cmd length());
  if (Serial.find(">")){
    esp.print(">");
    esp.print(cmd);
    Serial.println(cmd);
    }
    else{
      sendAT("AT+CIPCLOSE");
    }
    if (Serial.find("Error")){
      Serial.println("Recieved: Error \n EXIT2");
    }
    Serial.println();
}
    }
}

The error message displayed is:
arduinoo_sketch:21: error: stray '\' in program

   String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";

   ^

arduinoo_sketch:21: error: stray '\' in program

arduinoo_sketch:21: error: stray '\' in program

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:21:47: warning: missing terminating " character

   String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";

                                               ^

arduinoo_sketch:21: error: missing terminating " character

   String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";

   ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'boolean connectwifi()':

arduinoo_sketch:22: error: expected ',' or ';' before 'sendAT'

   sendAT(cmd);

   ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:24:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if (Serial.find("ERROR")){

                          ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:34:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if(Serial.find("Error")){

                         ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'void setup()':

arduinoo_sketch:44: error: 'send' was not declared in this scope

   send("AT");

            ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:46:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if(Serial.find("OK")){

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'void loop()':

arduinoo_sketch:64: error: 'updateTS' was not declared in this scope

   updateTS(temp,humid);

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'void updateTS(String, String)':

arduinoo_sketch:75: error: 'sendAt' was not declared in this scope

   sendAt(cmd);

             ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:77:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if (Serial.find("Error")){

                          ^

arduinoo_sketch:83: error: expected ')' before 'length'

   Serial.println(cmd length());

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:84:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if (Serial.find(">")){

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:92:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

     if (Serial.find("Error")){

                            ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: At global scope:

arduinoo_sketch:97: error: expected declaration before '}' token

     }

     ^

exit status 1
stray '\' in 


user612: At least one example is here:
String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";

You probably meant
String cmd="AT+CWJAP=\"abcd\",\"99999999\"";

This is a pretty trivial issue, you should be able to fix it simply by proofreading your sketch carefully.

user4628: By properly formatting your code (ctrl-T in the IDE), you realize what is wrong with your code... In
  String cmd = "AT+CWJAP="\"abcd"\",\"99999999"\";
               sendAT(cmd);

See how sendAT(cmd); is indented as if it was part of the previous line? It means you have some trouble with the quotes.

45347: <p>I got this error in the following program:</p>

<pre class="lang-c++ prettyprint-override"><code>#include &lt;SoftwareSerial.h&gt;
#include &lt;dht.h&gt;
dht DHT;
int a;
String temp;
String humid;
SoftwareSerial esp(0, 1);
#define SSID "abcd"
#define PASS "99999999"

void sendAT(String cmd) {
  Serial.print("SEND=");
  esp.println("cmd");
  Serial.println("cmd");
}

boolean connectwifi() {
  Serial.println("AT+CWMODE=1");
  delay(2000);
  Serial.println("AT+CWLAP");
  String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";
  sendAT(cmd);
  delay(5000);
  if (Serial.find("ERROR")){
    Serial.println("Recieved:Error could not connect");
    return false;
  }
  else{
    Serial.println("Wifi connected \n");

  }
  cmd="AT+CIPMUX=0";
  sendAT(cmd);
  if(Serial.find("Error")){
    esp.print("RECIEVED ERROR");
    return false;
  }
}

  void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  esp.begin(115200);
  send("AT");
  delay(5000);
  if(Serial.find("OK")){
    Serial.println("Recieved:OK\n ESP ready to send data\n");
    connectwifi();

  }

}

  void loop() {
  // put your main code here, to run repeatedly:
  a=DHT.read11(5);
  temp=DHT.temperature;
  humid=DHT.humidity;
  Serial.println("temperature: ");
  Serial.println(temp);
  Serial.println("humidity: ");
  Serial.println(humid);
  Serial.print("\n");
  updateTS(temp,humid);
  delay(3000);




}


void updateTS(String T, String H){
  String cmd="AT+CIPSTATRT=\"TCP\",\"api.thingspeak.com\",80";
  sendAt(cmd);
  delay (2000);
  if (Serial.find("Error")){
    Serial.print("Recieved :Error\n EXIT1");
    return;
  }
  cmd="GET/update?key=CJWN3VJZCQVTJD2J&amp;field1="+T+"&amp;field2+"+H+"\r\n";
  Serial.println("AT+CIPSEND=");
  Serial.println(cmd length());
  if (Serial.find("&gt;")){
    esp.print("&gt;");
    esp.print(cmd);
    Serial.println(cmd);
    }
    else{
      sendAT("AT+CIPCLOSE");
    }
    if (Serial.find("Error")){
      Serial.println("Recieved: Error \n EXIT2");
    }
    Serial.println();
}
    }
}
</code></pre>

<p>The error message displayed is:</p>

<pre><code>arduinoo_sketch:21: error: stray '\' in program

   String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";

   ^

arduinoo_sketch:21: error: stray '\' in program

arduinoo_sketch:21: error: stray '\' in program

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:21:47: warning: missing terminating " character

   String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";

                                               ^

arduinoo_sketch:21: error: missing terminating " character

   String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";

   ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'boolean connectwifi()':

arduinoo_sketch:22: error: expected ',' or ';' before 'sendAT'

   sendAT(cmd);

   ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:24:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if (Serial.find("ERROR")){

                          ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:34:25: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if(Serial.find("Error")){

                         ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'void setup()':

arduinoo_sketch:44: error: 'send' was not declared in this scope

   send("AT");

            ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:46:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if(Serial.find("OK")){

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'void loop()':

arduinoo_sketch:64: error: 'updateTS' was not declared in this scope

   updateTS(temp,humid);

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: In function 'void updateTS(String, String)':

arduinoo_sketch:75: error: 'sendAt' was not declared in this scope

   sendAt(cmd);

             ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:77:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if (Serial.find("Error")){

                          ^

arduinoo_sketch:83: error: expected ')' before 'length'

   Serial.println(cmd length());

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:84:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if (Serial.find("&gt;")){

                      ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino:92:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

     if (Serial.find("Error")){

                            ^

C:\Users\lenovo\Documents\Arduino\arduinoo_sketch\arduinoo_sketch.ino: At global scope:

arduinoo_sketch:97: error: expected declaration before '}' token

     }

     ^

exit status 1
stray '\' in 
</code></pre>
 612: <p>At least one example is here:</p>

<pre><code>String cmd="AT+CWJAP="\"abcd"\",\"99999999"\";
</code></pre>

<p>You probably meant</p>

<pre><code>String cmd="AT+CWJAP=\"abcd\",\"99999999\"";
</code></pre>

<p>This is a pretty trivial issue, you should be able to fix it simply by proofreading your sketch carefully.</p>
 4628: <p>By properly formatting your code (ctrl-T in the IDE), you realize what is wrong with your code... In</p>

<pre><code>  String cmd = "AT+CWJAP="\"abcd"\",\"99999999"\";
               sendAT(cmd);
</code></pre>

<p>See how <code>sendAT(cmd);</code> is indented as if it was part of the previous line? It means you have some trouble with the quotes.</p>
