一个给数组赋值的问题!!!
ctech 2005-06-16 10:15:34 #include <iostream>
#include <string>
using namespace std;
class air
{
private:
string information[10][5];
public:
void dis ();
air ();
};
air::air ()
{
string information[10][5] = //这个地方怎么给成员information初始化啊???
{
{"西安","北京","AX101","2005年10月8日","9点15分"},
{"西安","上海","AX102","2005年10月9日","10点20分"},
{"西安","伦敦","AX103","2005年10月10日","11点30分"},
{"西安","纽约","AX104","2005年10月11日","11点45分"},
{"西安","墨尔本","AX105","2005年10月12日","12点05分"},
{"西安","东京","AX106","2005年10月13日","14点30分"},
{"西安","Zaft","AX107","2005年10月14日","15点15分"},
{"西安","Plant","AX108","2005年10月15日","17点20分"},
{"西安","Devil","AX109","2005年10月16日","20点30分"},
{"西安","Bleach","AX110","2005年10月17日","21点15分"}
};
}
void air::dis ()
{
for (int i = 0; i<10; i++)
cout << information[i][1];
}
int main ()
{
air cli;
cli.dis ();
return 0;
}