bitset 的一个问题
为什么这段代码在VC6.0下可以编译通过,而在MingW中会报错呢?
#include <iostream>
#include <bitset>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
bitset <14> temp(9999);
cout < < temp.to_string() < < endl;
return(0);
}
[解决办法]
因为VC6不符合C++标准
cout < < temp.to_string <char, char_traits <char> , allocator <char> > () < < endl;