新手问问,很简单才学,有空进来看看

flycat_bob 2009-02-06 02:00:33
#include <iostream.h>
void main()
{
Count<<"ssss"<<endl;
}

我在VC++ 6.0中选择win32 application 创建程序,输入以上代码后,编译器提示:
F:\扫雷\ex00\ex00.cpp(4) : error C2065: 'Count' : undeclared identifier
F:\扫雷\ex00\ex00.cpp(4) : error C2297: '<<' : illegal, right operand has type 'char [5]'
Error executing cl.exe.

为什么会这样,找不到count这个函数,不是关联了 <iostream.h> 这个得嘛
另外,我用win32 console application 创建错误也一样?
...全文
165 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
fiyaa 2009-02-06
  • 打赏
  • 举报
回复
呵呵
sagegz 2009-02-06
  • 打赏
  • 举报
回复
真的是新手...
wangyi010704327 2009-02-06
  • 打赏
  • 举报
回复
cout
hai040 2009-02-06
  • 打赏
  • 举报
回复
iostream.h -> iostream
Count -> std::cout
win32 application -> console
maosher 2009-02-06
  • 打赏
  • 举报
回复
是cout
码格 2009-02-06
  • 打赏
  • 举报
回复
首先应该是cout,再者可以std::cout试试,或者添加这句: using namespace std;
weidong0210 2009-02-06
  • 打赏
  • 举报
回复
结贴了注意小错误
InfidelX 2009-02-06
  • 打赏
  • 举报
回复
#include <iostream>
using namespace std
void main()
{
cout <<"ssss" <<endl;
}

ysysbaobei 2009-02-06
  • 打赏
  • 举报
回复
你要仔细看 错的提示,一般都能找出问题所在
itxuls 2009-02-06
  • 打赏
  • 举报
回复
c小写 ?
叶落寒山 2009-02-06
  • 打赏
  • 举报
回复

#include <iostream.h>
void main()
{
//Count < <"ssss" < <endl;
Cout <<"ssss" < <endl;
}
kostion 2009-02-06
  • 打赏
  • 举报
回复
cout 不是 count
ysysbaobei 2009-02-06
  • 打赏
  • 举报
回复
'Count' : undeclared identifier ------未声明的标识符,应该是 cout 吧
梅文海 2009-02-06
  • 打赏
  • 举报
回复
来晚一步
chenqiang35 2009-02-06
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 waizqfor 的回复:]

OK

C/C++ code
#include <iostream.h>
void main()
{
cout <<"ssss" <<endl;
}
[/Quote]

up

同时也up2楼
jiangheng2008 2009-02-06
  • 打赏
  • 举报
回复
cout不是Count
mouse_xie 2009-02-06
  • 打赏
  • 举报
回复
是cout<<"ssss"<<endl;吧
soldierluo 2009-02-06
  • 打赏
  • 举报
回复
count 打错了是 cout
waizqfor 2009-02-06
  • 打赏
  • 举报
回复
[Quote=引用楼主 flycat_bob 的帖子:]
#include <iostream.h>
void main()
{
Count < <"ssss" < <endl;
}

我在VC++ 6.0中选择win32 application 创建程序,输入以上代码后,编译器提示:
F:\扫雷\ex00\ex00.cpp(4) : error C2065: 'Count' : undeclared identifier
F:\扫雷\ex00\ex00.cpp(4) : error C2297: ' < <' : illegal, right operand has type 'char [5]'
Error executing cl.exe.

为什么会这样,找不到count这个函数,不是关联了 <iostream…
[/Quote]
LZ书写格式要正规一点 不行 先找书看着写
waizqfor 2009-02-06
  • 打赏
  • 举报
回复

OK

#include <iostream.h>
void main()
{
cout <<"ssss" <<endl;
}

65,211

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

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