注册 登录
编程论坛 C++教室

这个 内部编译出错怎么解决呀??

hzz063 发布于 2010-07-01 19:10, 617 次点击
e:\练习文件\【c++】\cpp\cpphead.h(9) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1786)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more information
执行 cl.exe 时出错.


晕呀,,这个怎么回事呀???
6 回复
#2
lintaoyn2010-07-01 19:16
尽是英文…编译错误,连接错误,提示你自己去帮助菜单那了解更多的信息?
我英文好像有进步,楼主把代码贴出来看看
#3
hzz0632010-07-01 21:18
程序代码:
/*
是书上的一个例子,关于运算符重载函数作为类成员和友元函数
*/


//////////////////////////////////////////////////////////////////////////////////////////////
// 文件 CppHead.h

#include <iostream>
using namespace std;

class complex
{
public :
         complex(void){ real = 0; imag = 0;}                   //重载函数

         complex(double r, double i) { real = r ; imag = i; }

         friend complex operator + (complex &a, complex &b);  // 重载函数作为友元函数

         void play(void);

private:
        double real;

        double imag;
   
};


complex operator + (complex &a , complex &b)                 //定义友元函数

     {
        return complex(a.real + b.real, a.imag + b.imag);
     }

void complex:: play(void)                                   // 用作数据的输出
      {
         cout << '(' << real <<',' << imag << ')'<< endl;
         return;
      }
////////////////////////////////////////////////////////////////////////////////////////////////////////////


// cpp.cpp  主函数文件


#include "CppHead.h"

int main(void)
{
    complex a(3,4), b(5,-10), c;    //定义三个对象
   
    c = a + b;
    cout << "a = " ;a.play();
    cout << "b = " ;b.play();
    cout << "c = " ;c.play() ;

    return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
  选择帮助菜单的技术支持选项,我选了,又是提示 MSDN 不存在,请重新设置 MSDN 。
  MSDN 代表什么呀??
系不系编译器出问题了呀??
#4
方廷2010-07-01 21:44
#include <iostream>
using namespace std;
改成:
#include<iostream.h>
就可以
#5
hzz0632010-07-01 22:00
回复 4楼 方廷
这有什么关系吗
#6
hzz0632010-07-01 22:09
回复 4楼 方廷
呵呵…谢了,我刚在书上看到。原来这样。
#7
taqiao2010-07-02 10:03
路过
1