為何bcb中無法使用cout?

scott21cn 2002-05-09 09:09:48
有#include <iostream>
在控制台也不能執行
是什麼原因?
...全文
149 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
kennidy 2002-12-20
  • 打赏
  • 举报
回复
我测试的结果
#include <iostream>
就可以了
对于std::cout最好在BCB内直接写::cout

帮助内的说明
Example

//
// cout example #1
//
#include<iostream>
#include<iomanip>
void func ( )
{
using namespace std;
int i;
float f;

// read an integer and a float from stdin
cin >> i >> f;
// output the integer and goes at the line
cout << i << endl;
}

你要确定你的include环境变量内存在...\include这个值
yangguo_god 2002-12-17
  • 打赏
  • 举报
回复
using namespace std是什么意思
是使用名空间std,里面有cont的定义

favorit 2002-12-17
  • 打赏
  • 举报
回复
#include <iostream>
using namespace std;
等价与
#include <iostream>
std::cout
sdsugar 2002-12-17
  • 打赏
  • 举报
回复
能不能说详细些,#include <iostream.h>和#include <iostream>有什么区别,using namespace std是什么意思

silver_sky 2002-05-09
  • 打赏
  • 举报
回复
#include <iostream.h>
用cout ;
#include <iostream>
用std::cout
hanson_yi 2002-05-09
  • 打赏
  • 举报
回复
我可以的,你的路径是否正确!
liux330 2002-05-09
  • 打赏
  • 举报
回复
应该是#include <iostream.h>吧
jxnuhwp 2002-05-09
  • 打赏
  • 举报
回复
你为什么要用cout呢?
要么你就利用console wizard中用
fangrk 2002-05-09
  • 打赏
  • 举报
回复
#include <iostream>
using namespace std;
fangrk 2002-05-09
  • 打赏
  • 举报
回复
#include <iostream>
using namespace std;

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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