之前看到过网上有人发表,但是感觉做的没我好,虽然我是刚刚学。。FYI.
#include
using namespace std;
const int SLEN=30;
struct student{
char fullname[SLEN];
char hobby[SLEN];
int ooplevel;
};
int getinfo(student pa[],int n)
{
int i=0;
for(i;i
>pa[i].ooplevel).get();
}
else
break;
}
return i;
}
//getinfo() has two arguments:a pointer to the first element of
//an array of student sturctures and an int representing the
//number of elements of the array.The function solicits and
//stores data about students.It terminates input upon filling
//the array or upon encountering a blank line for the student
//name.The function returns the actual number of array elements
//filled.
void display1(student st)
{
cout<<"Fullname: "<
<