关于#c++#的问题:(https://img-mid.csdnimg.cn/release/static/image/mid/ask/013850585276192.png "#left")

请问这个是咋回事


```c++
#include
#include.h>
#include
using namespace std;
struct student{
    char number[3];
    char name[6];
    int age;
};
int main(){
    int n;
    cin>>n;
    student student[n];
    for(int i=0;i>student[i].number>>student[i].name>>student[i].age;
    }
    for(int i=0;i1;j0){
            swap(student[i].number,student[j].number);
            swap(student[i].name,student[j].name);
            swap(student[i].age,student[j].age);
        }    
        }
    }
    for(int i=0;i3)<[i].number<6)<[i].name<3)<[i].age;
    cout<0;i1;jstudent[j].age){
            swap(student[i].number,student[j].number);
            swap(student[i].name,student[j].name);
            swap(student[i].age,student[j].age);
        }    
        }
    }
    for(int i=0;i3)<[i].number<6)<[i].name<3)<[i].age;
    cout<

img

![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/013850585276192.png "#left")

char number[3] 只能保存2个字符,第3个元素是结束标记'\0',数组改大一点。
交换直接用 swap(student[i], student[j]);