|
http://www.hackerschool.org/HS_Boards/zboard.php?AllArticle=true&no=3013 [복사]
#include <iostream>
using namespace std;
void ShowMenu(void);//메뉴선택
void CollegeGraduate(void);//학사
void ManagementConsult(void);//상담관리
void Mileage(void);//마일리지
void MyMenu(void);//마이메뉴
void DataManagement(void);//학적자료관리
enum select {COLLEGEGRADUATE = 1, MANAGEMENTCONSULT, MILEAGE, MYMENU,EXIT};
int main(void)
{
int menu;
while(1) {
ShowMenu();
cout << "메뉴선택 : ";
cin >> menu;
switch(menu){
case COLLEGEGRADUATE :
CollegeGraduate();
break;
case MANAGEMENTCONSULT:
ManagementConsult();
break;
case MILEAGE:
Mileage();
break;
case MYMENU:
MyMenu();
break;
case EXIT:
break;
default:
cout <<"잘못 입력 하셨습니다." << endl;
}
return 0;
}
}
void ShowMenu(void)
{
cout << "========== 메 뉴 ==========" << endl;
cout << "1. 학 사" << endl;
cout << "2. 상담관리" << endl;
cout << "3. 마일리지" << endl;
cout << "4. MY MENU " << endl;
cout << "5. 종 료" << endl;
}
void CollegeGraduate(void)//학사
{
cout << "========== 메 뉴 ==========" << endl;
cout << "1. 학적관리" << endl;
cout << "2. 교육과정관리" << endl;
cout << "3. 수업관리" << endl;
cout << "4. E-Class" << endl;
cout << "5. 수강관리" << endl;
cout << "6. 성적관리" << endl;
cout << "7. 등록관리" << endl;
}
void DataManagement(void)//학적자료관리
{
cout << "========== 메 뉴 ==========" << endl;
cout << "1. 개인 정보 수정" << endl;
}
void ManagementConsult(void)//상담관리
{
cout << "========== 메 뉴 ==========" << endl;
cout << "1. 상담관리[학생]" << endl;
cout << "2. 상담신청" << endl;
}
void Mileage(void)//마일리지
{
cout << "========== 메 뉴 ==========" << endl;
cout << "1. 학생메뉴" << endl;
}
void MyMenu(void)//마이메뉴
{
cout << "========== 메 뉴 ==========" << endl;
cout << "1. 마이메뉴관리" << endl;
cout << "2. 개인정보수정" << endl;
cout << "3. 학적변동현황" << endl;
cout << "4. 휴학신청" << endl;
cout << "5. 개설강좌조회" << endl;
cout << "6. 시설보수요청" << endl;
cout << "7. 공지사항조회" << endl;
}
여기서처럼
메뉴 선택으로 1번을 눌러서 collegegraduate를 호출하면
그에 해당하는 메뉴가 나오게 되는데
저는 여기에서 한번더 메뉴를 선택하여 세부적으로 더 들어가고 싶은데,
다른 반복문을 사용하는 법은 없을까요. |
Hit : 9074 Date : 2011/05/22 08:20
|