Solved How could I call socket.h's connect() function without getting an error: "no matching member function for call to 'connect'"
-
As I saw, there is another
connect
function in Qt. Is there a way to exclude that function for the compiler? The code:if(connect(nSocket, (sockaddr*)&hint, sizeof(sockaddr_in)) >= 0) { return true; }
I'm using Ubuntu 20.04
-
Hi and welcome to devnet,
Use
::connect
in place of just connect which is the one from QObject.Out of curiosity, why not use Qt's network classes ?
-
Hi and welcome to devnet,
Use
::connect
in place of just connect which is the one from QObject.Out of curiosity, why not use Qt's network classes ?
-
Thanks! I don't use Qt's network class because I have a server already with this code. Maybe I'll rework it.
-
@Batyu Then please mark this topic as solved, thx.