来源:八戒影院人气:917更新:2023-02-11 10:53:07
《秋蝉》中,薛萍是个相当有正义感的人。按照陶站长的话说,薛萍是个民族主义者,她爱国,在抗战救国过程中,她完全不顾自身安危。算是女中豪杰了。
可是,正义感十足的薛萍却处处听从陶站长的话,这就让人费解了。
我们也看到,陶站长并不那么有正义感,他最关心的不是救百姓于水火,也不是国家的命运,他更关心自己的前程和富贵。
陶站长一把年纪,是薛萍的老师,经历的事情要比薛萍多,人也就变得世故圆滑。对于军统内部的黑暗,薛萍不清楚,但是陶站长是非常清楚的。
我们可以想象,陶站长在年轻时,也是个热血青年,受到三民主义号召,坚决驱逐鞑虏,和现在的薛萍是一样的。但是,因为是站长,他看得更多,就越失望,所以他舍弃了曾经的热血,开始关心自己的利益。
薛萍只是军统站的一个特工,受陶站长领导,对军统的内幕知之甚少。所以,她对军统依旧抱有幻想,认为军统是一个可以实现自己政治理想的组织。
这其实就是陶站长能在很大程度上摆布薛萍的原因:陶站长非常清楚薛萍的心理状态,也熟知她的能耐。
我们试想一下,如果进入四维空间,当40岁的你摆不起20岁的你,多简单啊。
陶站长只要多谈点理想信念,说点薛萍想听的,就能摆布她。
薛萍会认为跟着陶站长,哪怕有点个人牺牲,哪怕有点毁三观的行为,都是值得的,因为这是在救国。
在陶站长的安排下,薛萍利用自己与唐风的感情,成功打入兴和会内部,取得唐风信任。并且利用自己在军统学习的技术,监听唐风的电话。
很快,薛萍就发现,日军内部有人每天晚上与唐风联系,偶尔会传递重要信息。她将这件事向陶站长汇报了,却不知道这时的陶站长已经开始和宫本做起生意来。
这样一来,通过陶站长,唐风和林小庄就危险了。这俩人一旦暴露,就难免会牵扯到兴和会、池城和叶冲。
当一切真相大白,薛萍会内疚不已,所以,她的结局不容乐观,可能会在营救主角时牺牲自己。
#include <stdio.h>
#define SWN 3
#define NAMELEN 20
#define CODELEN 10
#define FNAMELEN 80
#define BUFLEN 80
/* �γ����Ʊ� */
char schoolwork[SWN][NAMELEN 1] = {"Chinese","Mathematic","English"};
struct record
{
char name[NAMELEN 1];
char code[CODELEN 1];
int marks[SWN];
int total;
}stu;
struct node
{
char name[NAMELEN 1]; /* ���� */
char code[CODELEN 1]; /* ѧ�� */
int marks[SWN]; /* ���γ̳ɼ� */
int total; /* �ܷ� */
struct node *next; /* ������Ԫָ�� */
}*head; /* ������ָ�� */
int total[SWN]; /* ���γ��ܷ� */
FILE *stfpt; /* �ļ�ָ�� */
char stuf[FNAMELEN]; /* �ļ��� */
/* ��ָ���ļ�����һ����¼ */
int readrecord(FILE *fpt,struct record *rpt)
{
char buf[BUFLEN];
int i;
if(fscanf(fpt,"%s",buf)!=1)
return 0; /* �ļ����� */
strncpy(rpt->name,buf,NAMELEN);
fscanf(fpt,"%s",buf);
strncpy(rpt->code,buf,CODELEN);
for(i=0;i<SWN;i )
fscanf(fpt,"%d",&rpt->marks[i]);
for(rpt->total=0,i=0;i<SWN;i )
rpt->total =rpt->marks[i];
return 1;
}
/* ��ָ���ļ�д��һ����¼ */
writerecord(FILE *fpt,struct record *rpt)
{
int i;
fprintf(fpt,"%s\n",rpt->name);
fprintf(fpt,"%s\n",rpt->code);
for(i=0;i<SWN;i )
fprintf(fpt,"%d\n",rpt->marks[i]);
return ;
}
/* ��ʾѧ����¼ */
displaystu(struct record *rpt)
{
int i;
printf("\nName : %s\n",rpt->name);
printf("Code : %s\n",rpt->code);
printf("Marks :\n");
for(i=0;i<SWN;i )
printf(" %-15s : M\n",schoolwork[i],rpt->marks[i]);
printf("Total : M\n",rpt->total);
}
/* ����������ܷ� */
int totalmark(char *fname)
{
FILE *fp;
struct record s;
int count,i;
if((fp=fopen(fname,"r"))==NULL)
{
printf("Can't open file %s.\n",fname);
return 0;
}
for(i=0;i<SWN;i )
total[i]=0;
count=0;
while(readrecord(fp,&s)!=0)
{
for(i=0;i<SWN;i )
total[i] =s.marks[i];
count ;
}
fclose(fp);
return count; /* ��� �¼�� */
}
/* �б���ʾѧ����Ϣ */
void liststu(char *fname)
{
FILE *fp;
struct record s;
if((fp=fopen(fname,"r"))==NULL)
{
printf("Can't open file %s.\n",fname);
return ;
}
while(readrecord(fp,&s)!=0)
{
displaystu(&s);
printf("\n Press ENTER to continue...\n");
while(getchar()!='\n');
}
fclose(fp);
return;
}
/* �������� */
struct node *makelist(char *fname)
{
FILE *fp;
struct record s;
struct node *p,*u,*v,*h;
int i;
if((fp=fopen(fname,"r"))==NULL)
{
printf("Can't open file %s.\n",fname);
return NULL;
}
h=NULL;
p=(struct node *)malloc(sizeof(struct node));
while(readrecord(fp,(struct record *)p)!=0)
{
v=h;
while(v&&p->total<=v->total)
{
u=v;
v=v->next;
}
if(v==h)
h=p;
else
u->next=p;
p->next=v;
p=(struct node *)malloc(sizeof(struct node));
}
free(p);
fclose(fp);
return h;
}
/* ˳����ʾ��������Ԫ */
void displaylist(struct node *h)
{
while(h!=NULL)
{
displaystu((struct record *)h);
printf("\n Press ENTER to continue...\n");
while(getchar()!='\n');
h=h->next;
}
return;
}
/* ��ѧ����������ѧ����¼ */
int retrievebyn(char *fname, char *key)
{
FILE *fp;
int c;
struct record s;
if((fp=fopen(fname,"r"))==NULL)
{
printf("Can't open file %s.\n",fname);
return 0;
}
c=0;
while(readrecord(fp,&s)!=0)
{
if(strcmp(s.name,key)==0)
{
displaystu(&s);
c ;
}
}
fclose(fp);
if(c==0)
printf("The student %s is not in the file %s.\n",key,fname);
return 1;
}
/* ��ѧ��ѧ�Ų���ѧ����¼ */
int retrievebyc(char *fname, char *key)
{
FILE *fp;
int c;
struct record s;
if((fp=fopen(fname,"r"))==NULL)
{
printf("Can't open file %s.\n",fname);
return 0;
}
c=0;
while(readrecord(fp,&s)!=0)
{
if(strcmp(s.code,key)==0)
{
displaystu(&s);
c ;
break;
}
}
fclose(fp);
if(c==0)
printf("The student %s is not in the file %s.\n",key,fname);
return 1;
}
main()
{
int i,j,n;
char c;
char buf[BUFLEN];
FILE *fp;
struct record s;
clrscr();
printf("Please input the students marks record file's name: ");
scanf("%s",stuf);
if((fp=fopen(stuf,"r"))==NULL)
{
printf("The file %s doesn't exit, do you want to creat it? (Y/N) ",stuf);
getchar();
c=getchar();
if(c=='Y'||c=='y')
{
fp=fopen(stuf,"w");
printf("Please input the record number you want to write to the file: ");
scanf("%d",&n);
for(i=0;i<n;i )
{
printf("Input the student's name: ");
scanf("%s",&s.name);
printf("Input the student's code: ");
scanf("%s",&s.code);
for(j=0;j<SWN;j )
{
printf("Input the %s mark: ",schoolwork[j]);
scanf("%d",&s.marks[j]);
}
writerecord(fp,&s);
}
fclose(fp);
}
}
fclose(fp);
getchar();
/*clrscr();*/
puts("Now you can input a command to manage the records.");
puts("m : mean of the marks.");
puts("t : total of the marks.");
puts("n : search record by student's name.");
puts("c : search record by student's code.");
puts("l : list all the records.");
puts("s : sort and list the records by the total.");
puts("q : quit!");
while(1)
{
puts("Please input command:");
scanf(" %c",&c); /* ����ѡ������ */
if(c=='q'||c=='Q')
{
puts("\n Thank you for your using.");
break; /* q�������������� */
}
switch(c)
{
case 'm': /* ����ƽ���� */
case 'M':
if((n=totalmark(stuf))==0)
{
puts("Error!");
break;
}
printf("\n");
for(i=0;i<SWN;i )
printf("%-15s's average is: %.2f.\n",schoolwork[i],(float)total[i]/n);
break;
case 't': /* �����ܷ� */
case 'T':
if((n=totalmark(stuf))==0)
{
puts("Error!");
break;
}
printf("\n");
for(i=0;i<SWN;i )
printf("%-15s's total mark is: %d.\n",schoolwork[i],total[i]);
break;
case 'n': /* ��ѧ��������Ѱ�Ҽ�¼ */
case 'N':
printf("Please input the student's name you want to search: ");
scanf("%s",buf);
retrievebyn(stuf,buf);
break;
case 'c': /* ��ѧ����ѧ��Ѱ�Ҽ�¼ */
case 'C':
printf("Please input the student's code you want to search: ");
scanf("%s",buf);
retrievebyc(stuf,buf);
break;
case 'l': /* �г�����ѧ����¼ */
case 'L':
liststu(stuf);
break;
case 's': /* ���ִܷӸߵ���������ʾ */
case 'S':
if((head=makelist(stuf))!=NULL)
displaylist(head);
break;
default: break;
}
}
}