本文整理汇总了C++中Student::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ Student::GetId方法的具体用法?C++ Student::GetId怎么用?C++ Student::GetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Student
的用法示例。
在下文中一共展示了Student::GetId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TeaStuDelete
void TeaStuDelete(void)
{
Student* student;
long id;
int again;
do
{
system("cls");
cin.clear();
cin.sync();
cout<<strTeaSD1;
INPUT_INT_L(id,1);
student=data.StuSearch(id);
if(student==NULL)
cout<<strTeaSDF;
else
{
cout<<strTeaSDConfirm1<<student->GetName()<<strTeaSDConfirm2<<student->GetId();
cout<<strTeaSDConfirm3<<student->GetClass()<<strTeaSDConfirm4;
int i;
INPUT_INT_LU(i,0,1);
if(i)
{
data.DelStu(id);
cout<<strTeaSDS;
}
}
cout<<strTeaSD2;
INPUT_INT_LU(again,0,1);
}while(again);
return;
}
示例2: main
int main()
{
Student stu;
char line[200];
gets(line);
stu.Init(line);
printf("%s,%d,%d,%d",stu.GetName().c_str(),stu.GetAge(),stu.GetId(),stu.Average());
return 0;
}
示例3: StuLogin
void StuLogin(void)
{
system("cls");
cin.clear();
cin.sync();
cout<<strInputStuId;
long id;
INPUT_INT_L(id,0);
cout<<strInputStuPassword;
string password;
cin>>password;
Student* student = data.StuSearch(id);
if(student==NULL||!student->PasswordCheck(password))
{
cout<<strInputStuError;
system("pause");
return;
}
bool quit=false;
do
{
system("cls");
cin.clear();
cin.sync();
int iMenu=-1;
cout<<strStuWelcome1<<student->GetName()<<endl;
cout<<strStuWelcome2<<student->GetId()<<endl;
cout<<strStuWelcome3<<student->GetClass()<<endl;
cout<<strStuMenu;
INPUT_INT_LU(iMenu,0,3);
switch(iMenu)
{
case 1:
StuPasswordChange(student);
break;
case 2:
StuCourseChoose(student);
break;
case 3:
StuGradesQuery(student);
break;
case 0:
quit = true;
break;
}
}while(!quit);
return;
}
示例4: TeaStuChange
void TeaStuChange(void)
{
Student* student;
long id;
int again;
do
{
system("cls");
cin.clear();
cin.sync();
cout<<strTeaSC1;
INPUT_INT_L(id,1);
student=data.StuSearch(id);
if(student==NULL)
cout<<strTeaSCF;
else
{
cout<<strTeaSCConfirm1<<student->GetName()<<strTeaSCConfirm2<<student->GetId();
cout<<strTeaSCConfirm3<<student->GetClass()<<strTeaSCConfirm4;
int i;
INPUT_INT_LU(i,0,1);
if(i)
{
string Class;
cout<<strTeaSC2;
cin>>Class;
student->SetClass(Class);
cout<<strTeaSCS;
}
}
cout<<strTeaSC3;
INPUT_INT_LU(again,0,1);
}while(again);
return;
}