Home > Back-end >  The structure of the body
The structure of the body

Time:11-03

For help, really don't know what these are, how to define the structure dynamic array? How to input the data? Why define the list and vector?

CodePudding user response:

The book isn't there? The building Lord what book, the author?

CodePudding user response:

Dynamic array structure can use list.
Of course with the vector can also
Sort function is a sorting function, versatile
Of course can also give structure order
Sort the last parameter is sorting method
Is the compare
You define your own sort function

CodePudding user response:

To sort the third function of reference https://blog.csdn.net/qq_34489443/article/details/86219772? Utm_source=app

CodePudding user response:

#include
using namespace std;

Struct Student
{
Char name [256].
Int score;
};

Int main ()
{
int n=10;
Student stu [n].
for(int i=0; iThe scanf (" % s % d ", stu [I]. Name, stu [I] score).
return 0;
}

CodePudding user response:

refer to the second floor weixin_45376832 response:
structure dynamic array can use list.
Of course with the vector can also
Sort function is a sorting function, versatile
Of course can also give structure order
Sort the last parameter is sorting method
Is the compare
You define your own sort function

How to deposit the student information into it
  • Related