LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 469|回复: 0

这个程序为什么编译通不过?

[复制链接]
发表于 2006-9-24 16:42:01 | 显示全部楼层 |阅读模式
在Debian下,编译下面这段代码
#include <iostream>
#include <bitset>
using namespace std;

int main()
{
  bitset<32> bitsev(16);
  cout << bitsev.to_string() << endl;

  return 0;
}
然后提示
test.cpp: In function `int main()':
test.cpp:8: error: no matching function for call to `std::bitset<32>::to_string
   ()'


但是在Ubuntu 和 SUSE下面都可以编译通过的。并且我查了STL的手册,bitset确实又to_string这个方法的。是不是我少装什么东西了?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表