楼上正解.没人做,但有人复制....#include#include#include#includeclass student{ public:char name[20];double chinese,number;public: student(){} student(char n[20],double nu,double chin) {strcpy(name,n);
number=nu; chinese=chin; } friend void main();};void main(){ cout>p;if((p>='0'&&p>name;
cout>number;
cout>chinese;
file[j]=new ofstream("d:\document",ios::ate);
*file[j]>c;
flag2=0;
do
{
if(c!='y'&&c!='n')
{
cout>c;
}
else
flag2=1;
}while(flag2==0);
}while(c=='y');
break; }
case '1': {
char name[20];double number,chinese;
char c;
do
{
cout>name;
cout>number;
cout>chinese;
file[j]=new ofstream("d:\document",ios::ate);
*file[j]>c;
if(c!='y'&&c!='n')
{
cout>c;
}
}while(c=='y');
break; }
case '2': {
char name[20];double nu,chin,eng;flag2=0;
char c;
if(i==0)
{
cout>name;
for(int h=0;hname)==0)
{
flag2=1;
cout>nu;
cout>chin;
s[h]->chinese=chin;
s[h]->number=nu;
cout>c;
if(c!='y'&&c!='n')
{
cout>c;
}
}while(c=='y');
break; }case '3': {
char n[20];int j=0;char c;
if(i==0)
{
cout>n;
for(int j=0;j>c;
if(c!='y'&&c!='n')
{
cout>c;
}
}
while(c=='y');
break; }case '4': {
int n,j=0;char c;
if(i==0){
cout>n;
for(int j=0;jnumber==n)
{
flag=1;
cout>c;
if(c!='y'&&c!='n')
{
cout>c;
}
}
while(c=='y');
break; }case '5': {
coutnumber
chinese
=60)jige++;
if(s[x]->chinese>=90)good++;}
if(i==0)
cout>w;
if(w!='y'&&w!='n')
cout>p; }while(w=='y'); }
|