fatal error C1083: 无法打开包括文件:“iostream.h”: No such file 请高手指点,这是什么错误啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这样呢#include <iostream> 试了,可是出现更多的问题,我把小程序贴出来吧:#include <iostream.h>class point{ int x; int y; point() { x=0; y=0; } point (int a,int b) { x=a; y=b; } void output() { cout<<x<<endl<<y<<endl; }};void main(){ point pt(5,5); pt.output();}新手,刚开始学习! #include <iostream.h>换成#include <iostream>using namespace std; 换后:d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(25) : error C2248: “point::point”: 无法访问 private 成员(在“point”类中声明)1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(12) : 参见“point::point”的声明1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(4) : 参见“point”的声明1>d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(26) : error C2248: “point::output”: 无法访问 private 成员(在“point”类中声明)1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(17) : 参见“point::output”的声明1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(4) : 参见“point”的声明1>生成日志保存在“file://d:\My Documents\Visual Studio 2008\Projects\helloworld\helloworld\Debug\BuildLog.htm”1>helloworld - 2 个错误,0 个警告========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ========== 1>: <iostream.h> 与 <iostream> 不是一个东西2>:class point{//默认是privateint x;int y; 为什么ssl vpn能通过gfw ? mfc下请问对话框类通过点击按钮执行某个方法,方法里面调用另外一个非对话框类的方法,但是那个方法要更新调用的对话框的控件 用DialogBox产生的模态对话框,为什么点不了它? winsocket如何以包的形式发送数据, recvfrom 怎么不阻塞了? 跪求 Xtreme ToolKit Pro 8.70/8.60完全版 (任何一个都可) 什么是屏幕坐标,什么是设备坐标? 请网络专家和数据库老鸟指教@ 怎么能在MFC中写入APIA函数? 做CRectTracker引起的关于OnPaint问题 【新手求助】VC如何调用Windows系统锁屏? 图像检测
#include <iostream>
#include <iostream.h>class point
{
int x;
int y;
point()
{
x=0;
y=0;
}
point (int a,int b)
{
x=a;
y=b;
}
void output()
{
cout<<x<<endl<<y<<endl;
}
};void main()
{
point pt(5,5);
pt.output();
}
新手,刚开始学习!
换成
#include <iostream>
using namespace std;
d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(25) : error C2248: “point::point”: 无法访问 private 成员(在“point”类中声明)
1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(12) : 参见“point::point”的声明
1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(4) : 参见“point”的声明
1>d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(26) : error C2248: “point::output”: 无法访问 private 成员(在“point”类中声明)
1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(17) : 参见“point::output”的声明
1> d:\my documents\visual studio 2008\projects\helloworld\helloworld\helloworld.cpp(4) : 参见“point”的声明
1>生成日志保存在“file://d:\My Documents\Visual Studio 2008\Projects\helloworld\helloworld\Debug\BuildLog.htm”
1>helloworld - 2 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
2>:
class point
{//默认是private
int x;
int y;