vs6使用不来

xcz1943 2006-10-15 10:50:40
小弟刚学c++,在csdn的好友们介绍使用vc6.0,然后网上下载了一个,安装一些良好,在拿着一本新买的书,照着上面做
新建--〉工程--〉win32 console application-->New file(hello.cpp)
文件如下
#include<iostream>
#include "stdafx.h"
using namespace std;
int main()
{
cout<<"hello worold";
return 0;
}编译错误如下:
E:\Program Files\Microsoft Visual Studio6\MyProjects\trt\hello.cpp(3) : error C2871: 'std' : does not exist or is not a namespace
E:\Program Files\Microsoft Visual Studio6\MyProjects\trt\hello.cpp(6) : error C2065: 'cout' : undeclared identifier
E:\Program Files\Microsoft Visual Studio6\MyProjects\trt\hello.cpp(6) : error C2297: '<<' : illegal, right operand has type 'char [13]'
执行 cl.exe 时出错.
请问一下怎么回事?用vc6开发c++哪里有好的资源?
...全文
153 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
tianshanfe 2006-10-15
  • 打赏
  • 举报
回复
还是用DEV-CPP吧,比这个好用,用来学习是最适合的了
sinall 2006-10-15
  • 打赏
  • 举报
回复
#include "stdafx.h"
#include<iostream>
using namespace std;
int main()
{
cout<<"hello worold";
return 0;
}
tianshanfe 2006-10-15
  • 打赏
  • 举报
回复
不要这个试试#include "stdafx.h"
lj860603 2006-10-15
  • 打赏
  • 举报
回复
不知道是不是路径设置的问题,试一试``

参考一下这个帖子:
http://community.csdn.net/Expert/topic/5060/5060425.xml?temp=.7967493
willren 2006-10-15
  • 打赏
  • 举报
回复
直接用IDE的编译按钮试试?
taodm 2006-10-15
  • 打赏
  • 举报
回复
"csdn的好友们介绍使用vc6.0"
是谁在害人?
赶快扔了VC6,换devcpp或VC7以上版本
飞哥 2006-10-15
  • 打赏
  • 举报
回复
预编译头文件
#include"stdafx.h"
放最前面
-----------
当然也可以不加那个
doudouHuY 2006-10-15
  • 打赏
  • 举报
回复
stdafx.h放在最开头。
#include "stdafx.h"
#include <iostream>
.....

64,648

社区成员

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

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