请高手指点,这是什么错误啊?

解决方案 »

  1.   

    这样呢
    #include <iostream>
      

  2.   

    试了,可是出现更多的问题,我把小程序贴出来吧:
    #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();
    }
    新手,刚开始学习!
      

  3.   

    #include <iostream.h>
    换成
    #include <iostream>
    using namespace std;
      

  4.   

    换后:
    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 个 ==========
      

  5.   

    1>: <iostream.h> 与 <iostream> 不是一个东西
    2>:
    class point
    {//默认是private
    int x;
    int y;