koralarts
koralarts

Reputation: 2112

Connect TCPIP clashes with QT Connect

I am having a problem with the connect function for TCPIP because QT has a similar function connect.

no matching function for call to MainWindow::connect(SOCKET&, sockaddr*, unsigned int)

Can someone help me with this error?

Thanks.

Upvotes: 1

Views: 569

Answers (1)

templatetypedef
templatetypedef

Reputation: 372784

If you want to disambiguate between the global function and the one in MainWindow, you can use the scope resolution operator:

::connect(/* ... arguments go here ... */)

The use of :: here tells the compiler to look at the global scope for the function, rather than using the standard name lookup technique that would find the one in the class first.

Upvotes: 6

Related Questions