#include<iostream.h>
#include<fstream.h>
#include<string.h>
#include<ctype.h>
#include"myVector-C.cpp"
const int line=10;//正文行数
void main()
{
myVector<int> capital(26,0),small(26,0),temp(26,0);
ofstream ofile("D:\\my.txt");
char str[80];
for(int i=0;i<=line;i++)
{
cout<<"输出第"<<i<<"行:";
cin.getline(str,80,'\n');
ofile<<str;
}
ofile.close();
ifstream ifile("D:\\my.txt");
char c;
while((c=ifile.get())!=EOF)
{//大写小写互换
if(islower(c)) small[c-'a']++ ;//small[c-'a']是什么意思呢?
if(isupper(c)) small[c-'A']++ ;
}
for(char letter='A';letter<='Z';letter++) cout<<" "<<letter;
cout<<endl;
for (i=0;i<capital.Size();i++) cout<<" "<<setw(2)<<capital[i];
cout<<endl;
for( letter='a';letter<='z';letter++) cout<<" "<<letter;
cout<<endl;
for (i=0;i<small.Size();i++) cout<<" "<<setw(2)<<capital[i];
cout<<endl;
temp=small+capital;
for(c='A';c<='Z';c++) cout<<" "<<c<<char(c+32);
cout<<endl;
for (i=0;i<temp.Size();i++) cout<<setw(1)<<temp[i];
cout<<endl;
}