}intabandon=0;//无效票数charname[4];//候选人名chardata[20];//输入数组memset(data,'\0',sizeof(data)); cout<<"Input Candidate:"<<endl;inti=0;while(1) { cin.getline(data,17);if(strncmp(data,"addCandidate",12)!=0) {break;//候选人输入结束}else{ memset(name,'\0',sizeof(name)...
}intabandon=0;//无效票数charname[4];//候选人名chardata[20];//输入数组memset(data,'\0',sizeof(data)); cout<<"Input Candidate:"<<endl;inti=0;while(1) { cin.getline(data,17);if(strncmp(data,"addCandidate",12)!=0) {break;//候选人输入结束}else{ memset(name,'\0',sizeof(name)...