数组基类定义为:
class ba
{
protected:
int a[100];
int n; //实际数组元素的个数
public:
void printAll()
{ for (int i=0;i<n;i++)
cout<<a[i]<<" ";
}
};
6
6 5 1 2 3 4
1 2 3 4 5 6
Anything about this OnlineJudge, Please Contact Administrator. Click add QQ
OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap
Copyright 2016 ACM算法攻关部cnt: 30277
关于网站改版