C ++ External Functional Names Overlapping

Im currently working on a class in which I have a method called "connect" inside it. Im also calls the winsock function "connect". This, of course, makes the compiler give me an error, because it does not know what to do with it.

How can I best solve such a problem with names?

I would like to keep the name of my method as it describes the best events.

I have no control over the name of the winsock function "connect", and even if I thought that it makes no sense to rename it.

I'm sure this or something similar was given elsewhere, but I was too dumb to find it.

+4
source share
1 answer

winsock :: . .

::connect(....params....);

, :

this->connect(...params...);

, , .

+4

Source: https://habr.com/ru/post/1687045/


All Articles