멘토링 관련 공지


기다리고 기다리시던 멘토링 관련 공지입니다.
두근두근 기다리실 것 같기도 하고, 멘토&멘티 배정을 끝내고 공지로 알려드리려 했으나.
정말 정말 랜덤으로 돌려서 뒤끝 없게ㅋㅋㅋㅋㅋ
하려고 3시간을 ㅡㅡ;; 공드려서 프로그램 짯습니다.

멘토&멘티 배정은 이번 정기회의(목)에 공개 배정하겠습니다. 랜덤입니다.


결과 예)
걍멘토 : 멘틸이 어쩔래 강아지
민멘토 : 꼬꼬마 멘티다 이마트
방멘토 : 난멘티 먼멘티 토토로
이멘토 : 멘멘티 어멘티 풍풍풍
저멘토 : 홍삼 콜라병 도라지
멘토 : 헐멘티 잉여짓
강멘토 : 심심해 멘티티
막멘토 : 송아지 넌멘티
서멘토 : 훌랄라 걍멘티


멘토 배정 프로그램 > mtrand.zip


ps. 현재 멘토는 1,4학년을 제외한 재학생 이며, 멘티 대상은 11학번 신입생 입니다. 추가적으로 4학년이지만 멘토가 하고싶으신분은 댓글 달아주세요.

소스코드 첨부.

#include 〈iostream> #include 〈string> #include 〈fstream> #define MAX_MEM 30 #define MAX_BUF_SIZE 20 using namespace std; int mRead(string* mArray, string mListSrc, int& count){ ifstream mList(mListSrc.c_str()); char buf[20]; if(mList.is_open()) while(!mList.eof()){ mList.getline(buf,20); mArray[count] = buf; count++; } return count; } int mDisplay(string* mArray){ int i=0; while(!mArray[i].empty()) cout << mArray[i++] << endl; return i; } void mRand(string* mArray,int count, unsigned int seed){ srand(seed); for(int i=0; i<1000; i++) mArray[rand()%count].swap(mArray[rand()%count]); } void mOutput(string* mtoArray, string* mtiArray, string mOutListSrc){ int mtoc,mtic,i; mtoc=mtic=i=0; string mout[MAX_MEM]; ofstream mOutList(mOutListSrc.c_str()); while(!mtoArray[mtoc].empty()) mout[mtoc++].append(mtoArray[mtoc]+"\t : "); while(!mtiArray[mtic].empty()) mout[mtic++%mtoc].append("\t"+mtiArray[mtic]); while(!mout[i].empty()) mOutList << mout[i++] << endl; } void main(){ int i,j; unsigned int seed; int mtoCount,mtiCount; string mto[MAX_MEM]; string mti[MAX_MEM]; mtoCount=mtiCount=i=j=0; mRead(mto,"mto_list.txt",mtoCount); mRead(mti,"mti_list.txt",mtiCount); cout << "맨토 Seed값을 입력해주세요.(unsigned int범위 정수)" << endl << "입력 : "; cin >> seed; mRand(mto,mtoCount,seed); cout << "맨티 Seed값을 입력해주세요(unsigned int범위 정수)" << endl << "입력 : "; cin >> seed; mRand(mti,mtiCount,seed); mOutput(mto,mti,"output_list.txt"); }

NateON : chocoss2달팽이네이트닷컴

Phone : 공일공팔칠삼육삼칠삼육

Cyworld :  쵸재깅.채ㅡ/chocoss2