本文整理汇总了C++中Students::Check_ID方法的典型用法代码示例。如果您正苦于以下问题:C++ Students::Check_ID方法的具体用法?C++ Students::Check_ID怎么用?C++ Students::Check_ID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Students
的用法示例。
在下文中一共展示了Students::Check_ID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Register_Function
void Register_Function(Modules md, Students st)
{
Students st;
Modules md;
int dd,mm,yyyy;
bool done=1;
bool done_d=1;
char string_date[15];
char ch_d,stat=2;
while(done_d)
{
system("cls");
cout<<"\n Enter the New date (E).";
cout<<"\n Exit (Q) ";
cout<<"\n Enter your choice: ";
cin>> ch_d;
switch(ch_d)
{
case 'q':
case 'Q':
done_d=0;
stat=1;
break;
case 'e':
case 'E':
stat=0;
break;
}
if(stat==1)
break;
else if(stat==2)
continue;
system("cls");
cout<<"Please Enter the Date(dd mm yyyy):";
cin>>dd>>mm>>yyyy;
while(done)
{ int ID;
md.Browse();
cout<<"\n Date(dd-mm-yyy):"<<dd<<"-"<<mm<<"-"<<yyyy;
cout<<"\n Please Select one of Modules by ID or -1 to exit: ";
cin>> ID;
if (ID<=-1) {done=0;break;}
if(md.Check_ID(ID)==0)
{getch();
continue;
}
int done_m=1;
while(done_m)
{
system("cls");
cout<<"\n Date(dd-mm-yyy):"<<dd<<"-"<<mm<<"-"<<yyyy<<" Module Name: "<<md.Get_Name(ID);
cout<<"\n Enter the student ID (I).";
//cout<<"\n Undo (U).";
//cout<<"\n Search student name by ID (S).";
cout<<"\n Browse students(B).";
cout<<"\n Exit (Q) ";
cout<<"\n Enter your choice: ";
char IDc;
int done_i=1;
int IDi=0;
cin>> IDc;
switch(IDc)
{
case 'q':
case 'Q':
done_m=0;
break;
case 'i':
case 'I':
//system("cls")
while(1){
cout<<"\n Date(dd-mm-yyy):"<<dd<<"-"<<mm<<"-"<<yyyy<<" Module Name: "<<md.Get_Name(ID);
cout<<"\n Enter Student ID (-1 to exit): ";
cin>>IDi;
if (IDi<0) break;
if (st.Check_ID(IDi))
{
cout<<"\n Date(dd-mm-yyy):"<<dd<<"-"<<mm<<"-"<<yyyy<<" Module Name: "<<md.Get_Name(ID)<<" Student ID/Name: "<<IDi<<'/'<<st.Get_Name(IDi);
cout<<"\n On Time (O).";
cout<<"\n Late (L).";
cout<<"\n Absent (A).";
cout<<"\n Exit (Q) ";
cout<<"\n Status: ";
cin>>IDc;
//.........这里部分代码省略.........