INTERNAL COMPILER ERROR这个错误怎么解决啊 ?
mldxs 2008-07-03 02:53:13 就一个小程序出现的问题
这个是employee类#include<iostream>
#include<cstring>
using namespace std ;
class employee
{
protected:
char name[20] ;
int age ;
int salary ;
public:
void setName(char name1[20])
{
strcpy(name,name1);
}
char* getName()
{
return name ;
}
void setAge(int age1)
{
age = age1 ;
}
int getAge()
{
return age ;
}
void setSalary(int salary1)
{
salary = salary1 ;
}
int getSalary()
{
return salary ;
}
};
下面是main方法
#include<iostream.h>
#include "employee.h"
void main()
{
employee e[4] ;
char name[20] ;
int age ;
int salary ;
int i = 0 ;
for(i = 0 ; i < 4 ; i++)
{
std::cout<<"请输入姓名"<<std::endl ;
std::cin>>name ;
e[i].setName(name) ;
std::cout<<"请输入年龄"<<std::endl ;
std::cin>>age ;
e[i].setAge(age) ;
std::cout<<"请输入薪水"<<std::endl ;
std::cin>>salary ;
e[i].setSalary(salary) ;
}
for(i = 0 ; i < 4 ; i++)
{
std::cout<<"员工姓名"<<e[i].getName<<std::endl ;
std::cout<<"员工年龄"<<e[i].getAge<<std::endl ;
std::cout<<"员工薪水"<<e[i].getSalary<<std::endl ;
}
}
感觉什么都没有问题却出现了下面的错误
INTERNAL COMPILER ERROR