简单的结构体数组

#include #include using namespace std; struct person{ char name[10]; unsigned int id; float salary; }; person allone[6]; int main(void) { int i; person temp; for(i=0; i<6; i++){ cout<>allone[i].name; cout<<"id:"; cin>>allone[i].id; cout<<"salary:"; cin>>allone[i].salary; cout<allone[j+1].salary){ temp=allone[j]; allone[j]=allone[j+1]; allone[j+1]=temp; } } } for(i=0; i<6; i++){ cout<




    推荐阅读