6 years, 10 months ago.

MQTT client global declaration?

Can I declare client as a global variable in MQTT?

 MQTTSocket ipstack;
 MQTT::Client<MQTTSocket, Countdown> client
int main()
{
 ipstack = MQTTSocket();
 client = MQTT::Client<MQTTSocket, Countdown>(ipstack);
}

It is giving me following error:

Quote:

no matching function for call to 'MQTT::Client<MQTTSocket, Countdown>::Client()'

Be the first to answer this question.