// ****************************************************************************
// DiaoCha.cpp version: 1.0 date: 12/08/2005
// ---------------------------------------------------------------------------
// Summary:
// ---------------------------------------------------------------------------
// Copyright (C) LYH_Studio @ 2005 - All Rights Reserved
// ****************************************************************************
//
// ****************************************************************************
//C++头文件
#include "MainInclude.h" //标准头文件和常量声明
/*********************/
/*-----> 正文 <------*/
/*********************/
/*------------------>Function @ main @ discription <--------------------------*
*@name: int main(int, char *); *
*@parameter:int, char * *
*@purpose: the entrance of the program *
*@return value: int *
*-----------------------------------------------------------------------------*/
int main(int ,char *)
{
bool Dispatch(char chSel);
void ShowLogo();
ShowLogo();
char select = 'A';
cout << "输入你的选择:" << endl
<< "A:开始统计 B:帮助 C:退出程序" << endl;
while (!Dispatch(getch())) {
cout << "输入你的选择:" << endl
<< "A:开始统计 B:帮助 C:退出程序" << endl;
}
return EXIT_SUCCESS;
}
/*------------------>Function @ Disparch @ discription <----------------------*
*@name:bool Dispatch(char chSel); *
*@parameter:char chSel =====>>the selection of client *
*@purpose: dispatch function *
*@return value: bool *
*-----------------------------------------------------------------------------*/
bool Dispatch(char chSel) {
switch (chSel)
{
case 'A':
case 'a':
StatisticComDispatch();
break;
case 'B':
case 'b':
ShowHelp(stringEx(), stringEx(), stringEx());
return false;
case 'C':
case 'c':
break;
default:
AnnounceError("选项输入错误!", "请再输入一次");
return false;
}
return true;
}
/*------------------>Function @ ShowLogo @ discription <----------------------*
*@name: void ShowLogo(); *
*@parameter:void *
*@purpose: Show the start logo *
*@return value: void *
*-----------------------------------------------------------------------------*/
void ShowLogo() {
/*cout <<" "*/
cout <<" CCCCC C CC SSS SSS OOOOO ";
cout <<" C C C C C S S S S OOOOOO ";
cout <<" C C C C C S S S S OO ";
cout <<" C C C C S S OO ";
cout <<" C C C C SS SS OO ";
cout <<" C C C C SS SS OO ";
cout <<" C C C CCCCCCCC S S OO ";
cout <<" C C C C C S S S S OO ";
cout <<" CCCCC CCCCCCCC C C SSSS SSSS OOOOOOOOOOOOO";
cout <<" ";
cout <<" ";
cout <<" Copyright @ LYH_Studio E-mail: liyehua1986@gmail.com ";
cout <<" Dormitory: C10-510 ";
cout <<" ";
cout <<" 本程序由 华南理工大学 计算机科学与技术一班 李业华 制作 ";
cout <<" ";
cout <<" 《 调查统计员 》 ";
}