Can't send SoftwareSerial to Class Object I have a problem when I try to use SoftwareSerial in a class.. 

Here my detail My class 

class MyEsp8266
{
 protected: 
     SoftwareSerial *esp8266;
 public: 
     MyEsp8266(SoftwareSerial *_esp8266){
           esp8266 = _esp8266;
     }
     void begin(int baud){
        esp8266-&gt;begin(baud);
     }
     String testAT(){
          esp8266-&gt;println("AT");
          return esp8266-&gt;readString();
     }
}


My Arduino code

#include &lt;SoftwareSerial.h&gt;
#include "MyEsp8266.h"
// the setup function runs once when you press reset or power the board

SoftwareSerial _esp(10, 11);
MyEsp8266 wifi(&amp;_esp);

void setup() {
    Serial.begin(9600);
    wifi.begin(115200);
    Serial.println(wifi.testAT());
}


It doesn't log anything But when I have used all code in Arduino code it worked. 

#include &lt;SoftwareSerial.h&gt;
// the setup function runs once when you press reset or power the board

SoftwareSerial _esp(10, 11);

void setup() {
    Serial.begin(9600);
    _esp.begin(115200);
    _esp.println("AT");
    Serial.println(_esp.readString());
}


Thank any tips. 
Regards.
This is more of a work-around than a solution, but the code you're trying to get to work, worked for me once I changed

wifi.begin(115200);


to

wifi.begin(9600);


(sorry I don't have enough karma to just comment)