文件名称:lab
介绍说明--下载内容均来自于网络,请自行研究使用
编写一个简单的学生成绩录入及显示系统,具体要求如下:
定义一个成绩结构体:至少包括C++、数学、英语;
定义一个学生结构体:至少包括姓名、性别、年龄、成绩结构体成员;
定义一个学生成绩录入函数,用于对学生进行成绩录入;采用动态分配的内存(new 和delete),对学生信息进行存储,要根据指定的输入数量进行内容分配;
重载函数的使用:定义二个比较函数,函数名为comp,该函数即可以对姓名进行比较也可以对成绩进行比较。
默认参数值的函数的使用:定义一个带有默认值参数的成绩排序函数,这个默认值参数用于区分是对那门成绩排序,如果使用默认值则表示对所有学生的C++成绩排序,否则按姓名排序,排序时要用到定义的重载函数comp;
定义一个学生数组,将排序结果存入该数组中。
-A defined write a simple student input and display system, specific requirements are as follows: to define one of the most accomplished structure: at least C++, mathematics, English definition of a student structure: at least include the name, sex, age, performance structure members student entry function for students grades entry dynamically allocated memory (new and delete), student information storage, content distribution according to the specified number of input overloaded function: Define two comparison function, a function called comp, the function names that comparison can also compare the achievements. Function of the use of default parameter values: define a sort function with a default value of the parameter achievements, the default value of the parameter is used to distinguish door achievements sort, if you use the default value, said all students C++ achievements Sort Otherwise, press The name sort, sort use to the definition of an overloaded function comp definitio
定义一个成绩结构体:至少包括C++、数学、英语;
定义一个学生结构体:至少包括姓名、性别、年龄、成绩结构体成员;
定义一个学生成绩录入函数,用于对学生进行成绩录入;采用动态分配的内存(new 和delete),对学生信息进行存储,要根据指定的输入数量进行内容分配;
重载函数的使用:定义二个比较函数,函数名为comp,该函数即可以对姓名进行比较也可以对成绩进行比较。
默认参数值的函数的使用:定义一个带有默认值参数的成绩排序函数,这个默认值参数用于区分是对那门成绩排序,如果使用默认值则表示对所有学生的C++成绩排序,否则按姓名排序,排序时要用到定义的重载函数comp;
定义一个学生数组,将排序结果存入该数组中。
-A defined write a simple student input and display system, specific requirements are as follows: to define one of the most accomplished structure: at least C++, mathematics, English definition of a student structure: at least include the name, sex, age, performance structure members student entry function for students grades entry dynamically allocated memory (new and delete), student information storage, content distribution according to the specified number of input overloaded function: Define two comparison function, a function called comp, the function names that comparison can also compare the achievements. Function of the use of default parameter values: define a sort function with a default value of the parameter achievements, the default value of the parameter is used to distinguish door achievements sort, if you use the default value, said all students C++ achievements Sort Otherwise, press The name sort, sort use to the definition of an overloaded function comp definitio
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lab4.cpp