求助~~~~~

rsbaby 2003-01-12 02:58:21
为什么同样的代码在VC++6中通过而在BCB6中就不能通过?
# inlude < iostream.h >
struct weather
{
double temp;
double wind;
};
void main()
{
weather today;
today.temp=30.5;
today.wind=10.1;
cout << "temp =" << today.temp << endl;
cout << "wind =" << today.wind << endl;
}



[C++ Error] File1.cpp(2): E2048 Unknown preprocessor directive: 'inlude'
[C++ Error] File1.cpp(13): E2451 Undefined symbol 'cout'
[C++ Error] File1.cpp(13): E2451 Undefined symbol 'endl'

...全文
43 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
GaoLun 2003-01-12
  • 打赏
  • 举报
回复
# inlude < iostream.h >
……………………
albeta 2003-01-12
  • 打赏
  • 举报
回复
[C++ Error] File1.cpp(2): E2048 Unknown preprocessor directive: 'inlude'

include 你写成inlude了。
Automatic 2003-01-12
  • 打赏
  • 举报
回复
将#include<iostream.h>
改成#include "iostream.h"
在我的BCB5里可通过
大概是因为你的iostream.h在VC中的目录与中不一样。
pp616 2003-01-12
  • 打赏
  • 举报
回复
#include<iostream>
而不是inlude < iostream.h >

551

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 茶馆
社区管理员
  • 茶馆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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