当前位置: 首页>>代码示例>>C++>>正文


C++ Students::Get_Name方法代码示例

本文整理汇总了C++中Students::Get_Name方法的典型用法代码示例。如果您正苦于以下问题:C++ Students::Get_Name方法的具体用法?C++ Students::Get_Name怎么用?C++ Students::Get_Name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Students的用法示例。


在下文中一共展示了Students::Get_Name方法的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;
//.........这里部分代码省略.........
开发者ID:alburaawi,项目名称:Academic-Projects,代码行数:101,代码来源:Register.cpp


注:本文中的Students::Get_Name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。