0

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?

Passer By
  • 19,325
  • 6
  • 49
  • 96
enekow
  • 31
  • 1
  • 7

1 Answers1

2

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.

BAE HA RAM
  • 465
  • 1
  • 3
  • 10
  • Searching in "entire solution" didn't find any `using namespace std`. Still, the problem was related with the namespaces. So using global namespace (`::bind()`) solved my problem. Thks – enekow Jan 24 '18 at 14:01