C2039“mem_fun”: 不是“std”的成员

来源:互联网 发布:荼靡电视剧大结局知乎 编辑:程序博客网 时间:2024/05/02 19:55

The function std::mem_fun is defined in the header <functional>.

On some older compilers, you don't necessarily need to #include a standard library header in order to use functions and classes defined in that header, because it might already be included by some other standard library header that you #include. This is not exclusive to VS; it was also true for older gcc versions, like 4.0. Newer compilers are more standard-conforming and will require you to #include the actual headers that define standard library functions and classes.


在.cpp文件中添加头文件 <functional>

0 0
原创粉丝点击