vector <Girl> girls;for(unsignedint g =0; g < girls.size(); g++){
girls[g]...}
: Subscript i instead of using g for Girls . 1) to enhance readability easily distinguish 2) simultaneously traverse the other vector
for(unsignedint b =0; b < boys.size(); b++){
cout << boys[b]<<" 的配对女士有:"<< endl;for(unsignedint g =0; g < girls.size(); g++){if(boys[b].satisfied(girls[g])== true &&
girls[g].satisfied(boys[b])== true){//注意调用的是否是函数以及函数是否含参以及含参顺序//cout << boys[b].getName() << "<-->" << girls[g].getName() << endl;如果只打印姓名,可能有重名,无法确定实际是哪位//因为database与Boy和Girl类不存在继承关系,所以只能通过对象调用public方法
cout << girls[g];}}
cout << endl;//一位男士的所有配对结束后空一行}
2. The index found does not correspond to:
Errors of: exact replication of the like bestMatchBoy (), the leakage changes alternative peer
When a similar method to achieve, after copying the replaced steps: 1) substitution rules summarized: Boy <-> Girl, G <-> B 2) to write information to the storage field vs built git