I'm trying to encapsulate winsock2 inside a class, and I have this member function called bind
, which obviously bumps into winsock2.h 's bind
function.
class foo {
public:
void bind();
void some_function() {
bind(_sockfd, p->ai_addr, p->ai_addrlen); //error... compiler actually calls foo::bind() instead of the global bind function.
}
private:
...
}
Is there a solution for this? (aside from renaming foo::bind()
).