C++ – about compilation error in Visual C++

cincludevisual c++

Error 1 error C2039: 'memchr' : is not a member of '`global namespace'' c:\program files\microsoft visual studio 9.0\vc\include\cstring 19 new project 17

Best Answer

You included header. This declares memchr function in std namespace. So you either include string.h or memory.h headers instead of cstring, or use std namespace when calling memchr.

Related Topic