typedef struct string name; string id; int age; string school; string green;Student;按这个结构体写一个函数把所有school为false的学生姓名学号都输出来
void printFalseSchoolStudents(Student students[], int size) { for (int i = 0; i < size; i++) { if (students[i].school == "false") { cout << "Name: " << students[i].name << endl; cout << "ID: " << students[i].id << endl; } } }
原文地址: http://www.cveoy.top/t/topic/gZkH 著作权归作者所有。请勿转载和采集!