我写了一个程序,怎么好像vc不认识queue?

flyingxu 2003-05-17 09:33:07
简化后的代码如下:
#include <stdio.h>
#include <queue>

typedef unsigned char byte;

class encode
{
private:
queue < byte > tag; // TAG temporary area

public:
encode(void);
~encode(void);
};

错误提示如下:
encode.hpp(33) : error C2143: syntax error : missing ';' before '<'
encode.hpp(33) : error C2501: 'queue' : missing storage-class or type specifiers
encode.hpp(33) : error C2059: syntax error : '<'
encode.hpp(33) : error C2238: unexpected token(s) preceding ';'
我是个stl新手,还请大家指教。
...全文
58 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
zliang520 2003-05-17
  • 打赏
  • 举报
回复
头文件改一下:
#include "iostream"
#include "queue"
using namespace std;
stdio.h是c下面的

24,860

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧