注册 登录
编程论坛 C++教室

bitset的小问题

dubaoshi 发布于 2008-05-08 08:50, 754 次点击
在C-FREE3.5中,bitset怎么不能编译成功呢?
大家看一下问题出在哪里?

#include<bitset>
#include<iostream.h>

int main()
{
    unsigned int quiz=0;
    bitset<32> quiz;
    cout<<quiz<<endl;
   
    return 0;
}

谢谢。
5 回复
#2
sunkaidong2008-05-08 09:46
#include<bitset>
#include<iostream>
using namespace std;
int main()
{
    unsigned int quiz=0;
    bitset<32> quiz1;
    cout<<quiz1<<endl;
   
    return 0;
}
#3
dubaoshi2008-05-08 10:54
在别的程序当中,不用加using namespace std;也一样正常运行的,但这个我加了以后还是不能运行的,编译时提示:
7:instantiated from here
英文我看不懂~~~
#4
sunkaidong2008-05-08 10:59
我用vc6.0通过编译
#5
dubaoshi2008-05-08 12:37
可能是编译器的原因了,我用DEV CPP编译也通过:)
谢谢。
#6
THE_ONE2009-07-14 16:42
C-FREE
我复制了以上代码到C-FREE中,运行不了
1