[SOLVED] How does this bit of code work?
Posted: Mon Aug 10, 2015 9:13 pm
Note that I'm an extremely new to C++. I'm wondering how this bit of code works:
It seems to be like calling connect here should be accessing a method on a NULL object, but it's not. Does this method somehow act as a constructor too?
Code: Select all
WiFiClient client;
if (!client.connect(host, httpPort))
{
Serial.println("connection failed");
return false;
}
It seems to be like calling connect here should be accessing a method on a NULL object, but it's not. Does this method somehow act as a constructor too?