typedef struct tarPartner{ char name ; int next; int current; int pCount; int perfect ;}S_PARTNER;int FindFreePartner(S_PARTNER * singles, int count){ int i = 0; for (i = 0; i < count; i++){ if ((singles.current == -1) && (singles.pCount != SINGLE_COUNT)){ return i; } } return -1;}int GetPerfectPosition(S_PARTNER * single, int id){ int i = 0; for (i = 0; i < SINGLE_COUNT; i++){ if (single.perfect == id){ return i; } } return 0x7FFFFFFF;}int main(void){ int i = 0; S_PARTNER man ; S_PARTNER women ; for (i = 0; i < SINGLE_COUNT; i++){ memset(&man, 0x0, sizeof(S_PARTNER)); memset(&women, 0x0, sizeof(S_PARTNER)); man.current = -1; women.current = -1; } strcpy(man .name, "liyapeng"); strcpy(man .name, "xietingfeng"); strcpy(man .name, "douwei"); strcpy(women .name, "wangfei"); strcpy(women .name, "zhangbaizhi"); strcpy(women .name, "zhouxun"); man .p
评论
分享到微信
打开微信,点击顶部的“╋”, 使用“扫一扫”将网页分享至微信。