expected unqualified-id before ‘using’

guoshixin121 2010-03-16 08:55:12
C++一个小白问题,但是一直不能解决,有哪位高人指点一下:

#include <iostream>
#include "dictionary.h"

using namespace std;//在此处报错:expected unqualified-id before ‘using’
...全文
1246 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
昵称很不好取 2010-03-16
  • 打赏
  • 举报
回复
你的 dictionary.h 文件里是不是有class定义,看下最后加没加分号;
guoshixin121 2010-03-16
  • 打赏
  • 举报
回复
多谢高人,果然是"dctionary"中的类声明后边少了分号
困扰了我一个多小时,哎.....
dubiousway 2010-03-16
  • 打赏
  • 举报
回复
另写一个程序:

就只写:

#include <iostream>
#include "dictionary.h"
void main(){}


看看编译有问题吗?如果有问题,#1楼同。
冻结 2010-03-16
  • 打赏
  • 举报
回复
#include "dictionary.h"

应该是这个东西有问题了。

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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