📄 elemlist.cpp
字号:
// Chapter 11 - Program 7 - ELEMLIST.CPP
#include <stdlib.h>
#include "elemlist.h"
void
employee_list::add_person(person *new_employee)
{
employee_element *temp;
temp = new employee_element(new_employee);
if (temp == NULL)
{
exit (1);
}
if (start == NULL)
{
start = end_of_list = temp;
}
else
{
end_of_list->next_employee = temp;
end_of_list = temp;
}
}
void
employee_list::display_list(void)
{
employee_element *temp;
temp = start;
do
{
temp->employee_data->display();
temp = temp->next_employee;
} while (temp != NULL);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -