I am trying to create a TCP Modbus Master class in c++, and in this class I need to have a Poco::Net::SocketStream object defined.
class TCPModbusMaster {
private:
Poco::Net::SocketStream str;
public:
TCPModbusMaster(Poco::Net::SocketStream str) {
this->str = str;
}
};
But in this situation, visual studio gives me those 2 errors:
1- no default constructor exists for class Poco::Net::SocketStream
2- function "Poco::Net::SocketStream::operator=(const Poco::Net::SocketStream &)" (declared implicitly) cannot be referenced -- it is a deleted function
for the line containing (this->str = str)
For error 1, I tried to add a default constructor for the class Poco::Net::SocketStream
Poco::Net::SocketStream::SocketStream() {
}
But I got this error:
no instance of overloaded function "Poco::Net::SocketStream::SocketStream" matches the specified type
What can I do?