题目内容

下列程序用于打印出ASCⅡ字符,其析构函数内的语句应为【 】。
include<iostream. h>
inelude<iomanip, h>
template<class T>
class Array
{
T * elems;
int size;
public:
Array(int.s);
~Array()
T& operator[](int)
void perator=(T)
};
template<class T>
Array<T>::Array(int s)
size=s;
elems=new T[size]
for(int i=0;i<size;i++)
elems[i]=0
}
template<celass T>
Array<T>::~Array()
{
______
template <class T>
T& Array<T>::operator[](int index)
{
return elems[index];
}
template<class T>
void Array<T>::operator=(T temp)
{
for(int i=0;i<size;i++)
elems[i]=temp;
}
void main()
{
int i,n=26;
Array<int> arr1(n)
Array<char> arr2(n)
for(i=0;i<n;i++)
{ -.
arr1[i]='a'+i;
arr2[i]='a'+i;
}
cout<<"ASCII 字符"<<endl;
for(i=0;i<n;i++)
cout<<setw(8)<<arr1[i]<<setw(8)<<arr2[i]<<endl;
}

查看答案
更多问题

A person should return his taxes to the IRS service and processing center for the purpose

情节与人物性格有怎样的关系?

在文学阅读过程中,读者的主观能动性表现在哪些方面?

文学作品对文学阅读的制约性表现在哪些方面?

答案查题题库