编程论坛's Archiver

dubaoshi 发表于 2008-5-8 08:50

bitset的小问题

在C-FREE3.5中,bitset怎么不能编译成功呢?
大家看一下问题出在哪里?

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

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

谢谢。[tk03] [tk04]

sunkaidong 发表于 2008-5-8 09:46

#include<bitset>
#include<iostream>
using namespace std;
int main()
{
    unsigned int quiz=0;
    bitset<32> quiz1;
    cout<<quiz1<<endl;
   
    return 0;
}

dubaoshi 发表于 2008-5-8 10:54

在别的程序当中,不用加using namespace std;也一样正常运行的,但这个我加了以后还是不能运行的,编译时提示:
7:instantiated from here
英文我看不懂~~~

sunkaidong 发表于 2008-5-8 10:59

我用vc6.0通过编译

dubaoshi 发表于 2008-5-8 12:37

可能是编译器的原因了,我用DEV CPP编译也通过:)
谢谢。[tk16]

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.