读书人

VC6下 STL 不能使用?为什么?解决就给

发布时间: 2012-03-01 10:25:46 作者: rapoo

VC6下 STL 不能使用???为什么??解决就给分
在VC6下写如下程序,报错!!
#include <queue>
int main()
{
queue a;
return 0;
}

错误如下:
G:\test.cpp(6) : error C2065: 'queue ' : undeclared identifier
G:\test.cpp(6) : error C2146: syntax error : missing '; ' before identifier 'a '
G:\test.cpp(6) : error C2065: 'a ' : undeclared identifier

所有错误都是因为queue不能被识别~~~ 我包含了头文件 怎么还会错?

[解决办法]
#include <queue>
int main()
{
std::queue a;
return 0;
}
亦可以,hehe
[解决办法]
queue <int>
兄弟,先找本stl入门的书看了再用。
另外,VC6就别玩stl,太垃圾的编译器了,早点扔掉,换devcpp或者vc2005

读书人网 >C++

热点推荐