数组这里报错
头文件#include<iostream.h>
class translate
{
public:
translate()
{
string1[9][9]={"one","two","three","four","five","six","seven","eight","nine","ten"};
string2[9][9]={"twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"};
string3[9][10]={"eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","ninteen"};
}
int num;
void display();
friend ostream& operator<<(ostream&output,translate &c);
private:
char string1[9][9];
char string2[9][9];
char string3[9][10];
};
。cpp文件
#include<iostream.h>
#include"translate.h"
ostream& operator<<(ostream&output,translate &a)
{
int c=a.num;
if(c<11)
output<<string1[c-1]<<endl;
if(c>10&&c<20)
output<<string3[c-11];
if(c>20&&c%10!=0)
output<<string2[c/10-2]<<' '<<string1[c%10-1]<<endl;
if(c>=20&&c%10==0)
output<<string2[c%10-1];
return output;
}
void translate::display()
{
cout<<"请输入一个0到99的数:"<<endl;
cin>>num;
}
main函数
#include<iostream.h>
#include"translate.h"
void main()
{
translate c;
c.display();
cout<<c;
}
这个程序哪里出错了?