bitset<> 在vs2008中可以用unsigned long类型初始化。
但是在VS2010中,bitset<> 不能用unsigned long初始化。会出现以下错误:
1>d:\program files\liyu\documents\visual studio 2010\projects\test2010cpp\test2010cpp\main.cpp(14): error C2679: 二进制“=”: 没有找到接受“unsigned long”类型的右操作数的运算符(或没有可接受的转换)
1> d:\program files (x86)\microsoft visual studio 10.0\vc\include\bitset(511): 可能是“std::bitset<_Bits> &std::bitset<_Bits>::operator =(const std::bitset<_Bits> &)”
1> with
1> [
1> _Bits=32
1> ]
1> 尝试匹配参数列表“(std::bitset<_Bits>, unsigned long)”时
1> with
1> [
1> _Bits=32
1> ]
请各位指点一下,十分感谢。