center = std::min(std::max(0.0,center),1.0);
这句代码提示一下错误
'min' : is not a member of 'std'
按照网上各种方法改后还是不行。
改怎么改?????
错误信息是说在std里没有这个成员,不知道为什么我用VS2010试了没问题,或者你改成__max(),_cpp_max()试试,或者自己定义一个宏来实现。
'min' : is not a member of 'std' --> min不是std::命名空间里的成员
#include<iostream>加了没?
std::min_element();
std::max_element();
或者
直接用 __max(a,b) __min(a,b)
在main函数上面加这个,#include。
是不是你原来把min给重载了