9.这个练习让您编写处理数组和结构的函数。下面是程序的框架,请提供其中描述的函数,以完成该程序。
// getinfo() has two arguments: a pointer to the first element of
// an array of student structures 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.
int getinfo(student pa[], int n)
{
int num_array_elem = n;
char tmp[SLEN];
for (unsigned i = 0; i < n; ++i) {
cout << "输入姓名:";
cin.getline(tmp, SLEN

最低0.47元/天 解锁文章
11万+

被折叠的 条评论
为什么被折叠?



