I'm new to c++ and have to create class for handling sockets. This class has a method named listen() and in this method need calling listen function to socket (for example see below) but method listen hiding listen function how to solve it ?
void CTCPBlockingSocket::listen() {
listen(server_socket,5);
}
Use the :: operator to specify you want the listen name which is in the global scope, not in a class or namespace.
void CTCPBlockingSocket::listen() {
::listen(server_socket,5);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With