本文整理汇总了C++中Students::get_student_last_name方法的典型用法代码示例。如果您正苦于以下问题:C++ Students::get_student_last_name方法的具体用法?C++ Students::get_student_last_name怎么用?C++ Students::get_student_last_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Students
的用法示例。
在下文中一共展示了Students::get_student_last_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
SetConsoleTitle(TEXT("Students" ));
// declaration of new variables
string st_name,st_last_name;
int final_scores[5] = {4,4,5,5,5};
float average_ball;
cout << "Enter Student name: ";
cin >> st_name;
cout << "Enter Student last name: ";
cin >> st_last_name;
Students *Student = new Students(st_name,st_last_name);
cout << "Enter Student scores: ";
for (int i=0;i<5;i++)
{
cin >> final_scores[i];
}
Student->set_student_name(st_name);
Student->set_student_last_name(st_last_name);
Student->set_student_score(final_scores);
average_ball = Student->calculate_average_ball(final_scores);
cout << "Current profile of student: " << endl;
cout << Student->get_student_name() << endl;
cout << Student->get_student_last_name() << endl;
cout << Student->get_average_ball() << endl;
cout << endl;
Student->show_scores();
cout << "Saving current profile to file..." << endl;
Student->save_profile();
delete Student;
system("pause");
return EXIT_SUCCESS;
}