enekow
enekow

Reputation: 31

Functions with the same name

I'm trying to use a function called bind(), this function is included in WinSock2.h. However, when I "go to definition" of the function VS leads me to another file.

So, the bind() function I'm trying to use is in:

c:\Program Files (x86)\Windows Kits\8.1\Include\um\WinSock2.h

But VS it taking the function from:

c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\functional

How can I "force" VS to use the function I want?

Upvotes: 0

Views: 137

Answers (1)

BAE HA RAM
BAE HA RAM

Reputation: 605

In C++ header file <functional> includes std::bind function.

So If u want to use your own bind function, u don't have to write using namespace std.

Because VS understands your bind function as std::bind of namespace std.

C++ reference of bind function is here.

Upvotes: 2

Related Questions